mirror of https://github.com/AxioDL/metaforce.git
SpecMP2: Make use of emplace_back()'s return value
Same behavior, less code.
This commit is contained in:
parent
e6f217bf25
commit
53694481e5
|
@ -105,8 +105,8 @@ struct SpecMP2 : SpecBase {
|
||||||
if (!item.second->m_doExtract) {
|
if (!item.second->m_doExtract) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
rep.childOpts.emplace_back();
|
|
||||||
ExtractReport& childRep = rep.childOpts.back();
|
ExtractReport& childRep = rep.childOpts.emplace_back();
|
||||||
hecl::SystemStringConv nameView(item.first);
|
hecl::SystemStringConv nameView(item.first);
|
||||||
childRep.name = hecl::SystemString(nameView.sys_str());
|
childRep.name = hecl::SystemString(nameView.sys_str());
|
||||||
childRep.desc = item.second->getLevelString();
|
childRep.desc = item.second->getLevelString();
|
||||||
|
@ -122,8 +122,7 @@ struct SpecMP2 : SpecBase {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Root Report */
|
/* Root Report */
|
||||||
reps.emplace_back();
|
ExtractReport& rep = reps.emplace_back();
|
||||||
ExtractReport& rep = reps.back();
|
|
||||||
rep.name = _SYS_STR("MP2");
|
rep.name = _SYS_STR("MP2");
|
||||||
rep.desc = _SYS_STR("Metroid Prime 2 ") + regstr;
|
rep.desc = _SYS_STR("Metroid Prime 2 ") + regstr;
|
||||||
std::string buildStr(buildInfo);
|
std::string buildStr(buildInfo);
|
||||||
|
@ -175,8 +174,7 @@ struct SpecMP2 : SpecBase {
|
||||||
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
|
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
|
||||||
|
|
||||||
/* Root Report */
|
/* Root Report */
|
||||||
reps.emplace_back();
|
ExtractReport& rep = reps.emplace_back();
|
||||||
ExtractReport& rep = reps.back();
|
|
||||||
rep.name = _SYS_STR("MP2");
|
rep.name = _SYS_STR("MP2");
|
||||||
rep.desc = _SYS_STR("Metroid Prime 2 ") + regstr;
|
rep.desc = _SYS_STR("Metroid Prime 2 ") + regstr;
|
||||||
if (buildInfo) {
|
if (buildInfo) {
|
||||||
|
|
Loading…
Reference in New Issue