mirror of https://github.com/AxioDL/metaforce.git
SpecMP3: Make use of emplace_back()'s return value
Same behavior, less code.
This commit is contained in:
parent
be1d77f550
commit
ac28575e9d
|
@ -135,8 +135,8 @@ struct SpecMP3 : SpecBase {
|
|||
for (const auto& item : fe ? m_feOrderedPaks : m_orderedPaks) {
|
||||
if (!item.second->m_doExtract)
|
||||
continue;
|
||||
rep.childOpts.emplace_back();
|
||||
ExtractReport& childRep = rep.childOpts.back();
|
||||
|
||||
ExtractReport& childRep = rep.childOpts.emplace_back();
|
||||
hecl::SystemStringConv nameView(item.first);
|
||||
childRep.name = hecl::SystemString(nameView.sys_str());
|
||||
if (item.first == "Worlds.pak")
|
||||
|
@ -168,8 +168,7 @@ struct SpecMP3 : SpecBase {
|
|||
return false;
|
||||
|
||||
/* Root Report */
|
||||
reps.emplace_back();
|
||||
ExtractReport& rep = reps.back();
|
||||
ExtractReport& rep = reps.emplace_back();
|
||||
rep.name = _SYS_STR("MP3");
|
||||
rep.desc = _SYS_STR("Metroid Prime 3 ") + regstr;
|
||||
std::string buildStr(buildInfo);
|
||||
|
@ -250,8 +249,7 @@ struct SpecMP3 : SpecBase {
|
|||
}
|
||||
|
||||
/* Root Report */
|
||||
reps.emplace_back();
|
||||
ExtractReport& rep = reps.back();
|
||||
ExtractReport& rep = reps.emplace_back();
|
||||
rep.name = _SYS_STR("MP3");
|
||||
rep.desc = _SYS_STR("Metroid Prime 3 ") + regstr;
|
||||
|
||||
|
@ -281,8 +279,7 @@ struct SpecMP3 : SpecBase {
|
|||
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
|
||||
|
||||
/* Root Report */
|
||||
reps.emplace_back();
|
||||
ExtractReport& rep = reps.back();
|
||||
ExtractReport& rep = reps.emplace_back();
|
||||
rep.name = _SYS_STR("fe");
|
||||
rep.desc = _SYS_STR("Metroid Prime Trilogy Frontend ") + regstr;
|
||||
if (buildInfo) {
|
||||
|
|
Loading…
Reference in New Issue