2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

General: Make use of emplace_back where applicable

Allows for in-place construction. Also results in less code to read in
certain usages.
This commit is contained in:
Lioncash
2020-03-21 00:12:13 -04:00
parent 36ac0a8d78
commit fc4df76afc
13 changed files with 38 additions and 33 deletions

View File

@@ -30,12 +30,12 @@ bool CSaveWorldIntermediate::InitializePump() {
x4_strgId = wld.IGetStringTableAssetId();
x8_savwId = wld.IGetSaveWorldAssetId();
u32 areaCount = wld.IGetAreaCount();
const u32 areaCount = wld.IGetAreaCount();
xc_areaIds.reserve(areaCount);
for (u32 i = 0; i < areaCount; ++i) {
const IGameArea* area = wld.IGetAreaAlways(i);
xc_areaIds.push_back(area->IGetAreaId());
xc_areaIds.emplace_back(area->IGetAreaId());
}
CAssetId mlvlId = wld.IGetWorldAssetId();