mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:07:41 +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:
@@ -188,7 +188,7 @@ CFontImageDef CTextParser::GetImage(const char16_t* str, int len,
|
||||
texs.reserve(commaCount - 1);
|
||||
do {
|
||||
AdvanceCommaPos();
|
||||
texs.push_back(x0_store.GetObj({SBIG('TXTR'), GetAssetIdFromString(&iterable[tokenPos], len, txtrMap)}));
|
||||
texs.emplace_back(x0_store.GetObj({SBIG('TXTR'), GetAssetIdFromString(&iterable[tokenPos], len, txtrMap)}));
|
||||
AdvanceTokenPos();
|
||||
} while (commaPos != iterable.size());
|
||||
|
||||
@@ -211,7 +211,7 @@ CFontImageDef CTextParser::GetImage(const char16_t* str, int len,
|
||||
texs.reserve(commaCount - 3);
|
||||
do {
|
||||
AdvanceCommaPos();
|
||||
texs.push_back(x0_store.GetObj({SBIG('TXTR'), GetAssetIdFromString(&iterable[tokenPos], len, txtrMap)}));
|
||||
texs.emplace_back(x0_store.GetObj({SBIG('TXTR'), GetAssetIdFromString(&iterable[tokenPos], len, txtrMap)}));
|
||||
AdvanceTokenPos();
|
||||
} while (commaPos != iterable.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user