From 09d0469c961dce2cfd4011c4bc5b3600345e5ba7 Mon Sep 17 00:00:00 2001 From: Alice Ogeda Date: Fri, 24 Mar 2023 13:32:36 -0300 Subject: [PATCH] emplace_back for in-place move const for shared ptr; --- deps/datReader/DatCategories/bg/lgb.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/deps/datReader/DatCategories/bg/lgb.h b/deps/datReader/DatCategories/bg/lgb.h index c5c99f11..337d6731 100644 --- a/deps/datReader/DatCategories/bg/lgb.h +++ b/deps/datReader/DatCategories/bg/lgb.h @@ -237,39 +237,39 @@ struct LGB_GROUP const auto type = *reinterpret_cast< LgbEntryType* >( buf + entryOffset ); if( type == LgbEntryType::BgParts ) { - entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::Gimmick ) { - entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::EventNpc ) { - entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::EventObject ) { - entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::ExitRange ) { - entries.push_back( std::make_shared< LGB_EXIT_RANGE_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_EXIT_RANGE_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::EventRange ) { - entries.push_back( std::make_shared< LGB_EVENT_RANGE_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_EVENT_RANGE_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::PopRange ) { - entries.push_back( std::make_shared< LGB_POP_RANGE_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_POP_RANGE_ENTRY >( buf, entryOffset ) ); } else if( type == LgbEntryType::MapRange ) { - entries.push_back( std::make_shared< LGB_MAP_RANGE_ENTRY >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LGB_MAP_RANGE_ENTRY >( buf, entryOffset ) ); } else { - entries.push_back( std::make_shared< LgbEntry >( buf, entryOffset ) ); + entries.emplace_back( std::make_shared< LgbEntry >( buf, entryOffset ) ); } } catch( std::exception& e )