mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-12 18:37:46 +00:00
emplace_back for in-place move const for shared ptr;
This commit is contained in:
parent
d5c4739a77
commit
09d0469c96
1 changed files with 9 additions and 9 deletions
18
deps/datReader/DatCategories/bg/lgb.h
vendored
18
deps/datReader/DatCategories/bg/lgb.h
vendored
|
@ -237,39 +237,39 @@ struct LGB_GROUP
|
||||||
const auto type = *reinterpret_cast< LgbEntryType* >( buf + entryOffset );
|
const auto type = *reinterpret_cast< LgbEntryType* >( buf + entryOffset );
|
||||||
if( type == LgbEntryType::BgParts )
|
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 )
|
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 )
|
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 )
|
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 )
|
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 )
|
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 )
|
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 )
|
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
|
else
|
||||||
{
|
{
|
||||||
entries.push_back( std::make_shared< LgbEntry >( buf, entryOffset ) );
|
entries.emplace_back( std::make_shared< LgbEntry >( buf, entryOffset ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( std::exception& e )
|
catch( std::exception& e )
|
||||||
|
|
Loading…
Add table
Reference in a new issue