use make_shared where appropriate

This commit is contained in:
Martin Michelsen
2023-11-30 10:24:27 -08:00
parent c833b575e4
commit 956e890ad6
33 changed files with 279 additions and 305 deletions
+1 -1
View File
@@ -333,7 +333,7 @@ shared_ptr<PSOBBCharacterFile> PSOBBCharacterFile::create_from_preview(
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
shared_ptr<PSOBBCharacterFile> ret(new PSOBBCharacterFile());
auto ret = make_shared<PSOBBCharacterFile>();
const auto& initial_items = initial_inventory.at(preview.visual.char_class);
ret->inventory.num_items = initial_items.size();