mirror of https://github.com/AxioDL/metaforce.git
SpecMP1: Make use of emplace_back() where applicable
Same behavior, but allows in-place construction.
This commit is contained in:
parent
9af90efb7d
commit
97fd815afa
|
@ -108,7 +108,7 @@ struct TextureCache {
|
||||||
auto rec = r.enterSubRecord(node.first.c_str());
|
auto rec = r.enterSubRecord(node.first.c_str());
|
||||||
TXTR::Meta meta;
|
TXTR::Meta meta;
|
||||||
meta.read(r);
|
meta.read(r);
|
||||||
metaPairs.push_back(std::make_pair(projectPath.parsedHash32(), meta));
|
metaPairs.emplace_back(projectPath.parsedHash32(), meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(metaPairs.begin(), metaPairs.end(), [](const auto& a, const auto& b) -> bool {
|
std::sort(metaPairs.begin(), metaPairs.end(), [](const auto& a, const auto& b) -> bool {
|
||||||
|
@ -1022,7 +1022,7 @@ struct SpecMP1 : SpecBase {
|
||||||
for (const auto& dep : area.deps) {
|
for (const auto& dep : area.deps) {
|
||||||
urde::CAssetId newId = dep.id.toUint64();
|
urde::CAssetId newId = dep.id.toUint64();
|
||||||
if (dupeRes || addedTags.find(newId) == addedTags.end()) {
|
if (dupeRes || addedTags.find(newId) == addedTags.end()) {
|
||||||
listOut.push_back({dep.type, newId});
|
listOut.emplace_back(dep.type, newId);
|
||||||
addedTags.insert(newId);
|
addedTags.insert(newId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1082,7 +1082,7 @@ struct SpecMP1 : SpecBase {
|
||||||
for (atUint32 i = 0; i < mapaCount; ++i) {
|
for (atUint32 i = 0; i < mapaCount; ++i) {
|
||||||
UniqueID32 id;
|
UniqueID32 id;
|
||||||
id.read(r);
|
id.read(r);
|
||||||
listOut.push_back({FOURCC('MAPA'), id.toUint64()});
|
listOut.emplace_back(FOURCC('MAPA'), id.toUint64());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue