tag/Id3Load, ...: use std::make_unique_for_overwrite()
Don't zero-initialize the buffers. This removes some useless overhead.
This commit is contained in:
@@ -101,7 +101,7 @@ SidplayGlobal::SidplayGlobal(const ConfigBlock &block)
|
||||
const auto kernal_path = block.GetPath("kernal");
|
||||
if (!kernal_path.IsNull())
|
||||
{
|
||||
kernal = std::make_unique<uint8_t[]>(rom_size);
|
||||
kernal = std::make_unique_for_overwrite<uint8_t[]>(rom_size);
|
||||
loadRom(kernal_path, kernal.get());
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ SidplayGlobal::SidplayGlobal(const ConfigBlock &block)
|
||||
const auto basic_path = block.GetPath("basic");
|
||||
if (!basic_path.IsNull())
|
||||
{
|
||||
basic = std::make_unique<uint8_t[]>(rom_size);
|
||||
basic = std::make_unique_for_overwrite<uint8_t[]>(rom_size);
|
||||
loadRom(basic_path, basic.get());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user