mirror of https://github.com/AxioDL/metaforce.git
SpecMP2: Prevent unnecessary copies in buildPaks()
Uses auto to properly deduce the intended return type in iteration (pair with a const string), which prevents a copy from needing to be generated.
This commit is contained in:
parent
97fd815afa
commit
e6f217bf25
|
@ -101,9 +101,10 @@ struct SpecMP2 : SpecBase {
|
||||||
m_orderedPaks[std::string(dpak.getName())] = &dpak;
|
m_orderedPaks[std::string(dpak.getName())] = &dpak;
|
||||||
|
|
||||||
/* Assemble extract report */
|
/* Assemble extract report */
|
||||||
for (const std::pair<std::string, DNAMP2::PAKBridge*>& item : m_orderedPaks) {
|
for (const auto& item : m_orderedPaks) {
|
||||||
if (!item.second->m_doExtract)
|
if (!item.second->m_doExtract) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
rep.childOpts.emplace_back();
|
rep.childOpts.emplace_back();
|
||||||
ExtractReport& childRep = rep.childOpts.back();
|
ExtractReport& childRep = rep.childOpts.back();
|
||||||
hecl::SystemStringConv nameView(item.first);
|
hecl::SystemStringConv nameView(item.first);
|
||||||
|
|
Loading…
Reference in New Issue