refactor: make memory from zone a reference instead of ptr

This commit is contained in:
Jan
2025-05-02 11:42:17 +01:00
parent 9e940a6f53
commit 8b85cadb77
29 changed files with 78 additions and 78 deletions

View File

@ -19,6 +19,6 @@ void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image)
{
const size_t loadDefSize = offsetof(IW3::GfxImageLoadDef, data) + loadDef->resourceSize;
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone.GetMemory()->AllocRaw(loadDefSize));
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone.Memory().AllocRaw(loadDefSize));
memcpy(image->texture.loadDef, loadDef, loadDefSize);
}

View File

@ -14,7 +14,7 @@ void Actions_LoadedSound::SetSoundData(MssSound* sound) const
if (sound->info.data_len > 0)
{
const auto* tempData = sound->data;
sound->data = m_zone.GetMemory()->Alloc<char>(sound->info.data_len);
sound->data = m_zone.Memory().Alloc<char>(sound->info.data_len);
memcpy(sound->data, tempData, sound->info.data_len);
}
else