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;
|
||||
|
||||
/* Assemble extract report */
|
||||
for (const std::pair<std::string, DNAMP2::PAKBridge*>& item : m_orderedPaks) {
|
||||
if (!item.second->m_doExtract)
|
||||
for (const auto& item : m_orderedPaks) {
|
||||
if (!item.second->m_doExtract) {
|
||||
continue;
|
||||
}
|
||||
rep.childOpts.emplace_back();
|
||||
ExtractReport& childRep = rep.childOpts.back();
|
||||
hecl::SystemStringConv nameView(item.first);
|
||||
|
|
Loading…
Reference in New Issue