let FileReader::Read return an opaque buffer instead of std::vector.

This can later allow returning a pointer to a static buffer from a cache without creating copies.
This commit is contained in:
Christoph Oelckers 2023-12-10 09:07:26 +01:00
commit fc84579319
12 changed files with 248 additions and 85 deletions

View file

@ -2427,7 +2427,7 @@ void G_DoSaveGame (bool okForQuicksave, bool forceQuicksave, FString filename, c
}
auto picdata = savepic.GetBuffer();
FCompressedBuffer bufpng = { picdata->Size(), picdata->Size(), FileSys::METHOD_STORED, 0, static_cast<unsigned int>(crc32(0, &(*picdata)[0], picdata->Size())), (char*)&(*picdata)[0] };
FCompressedBuffer bufpng = { picdata->size(), picdata->size(), FileSys::METHOD_STORED, 0, static_cast<unsigned int>(crc32(0, &(*picdata)[0], picdata->size())), (char*)&(*picdata)[0] };
savegame_content.Push(bufpng);
savegame_filenames.Push("savepic.png");