mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Some minor code modernization in MameNames
This commit is contained in:
parent
068b7c6bfd
commit
f9401529d1
|
@ -48,7 +48,7 @@ MameNames::MameNames()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pugi::xml_node gameNode = doc.child("game"); gameNode;
|
for (pugi::xml_node gameNode {doc.child("game")}; gameNode;
|
||||||
gameNode = gameNode.next_sibling("game")) {
|
gameNode = gameNode.next_sibling("game")) {
|
||||||
mNamePairs[gameNode.child("mamename").text().get()] =
|
mNamePairs[gameNode.child("mamename").text().get()] =
|
||||||
gameNode.child("realname").text().get();
|
gameNode.child("realname").text().get();
|
||||||
|
@ -75,7 +75,7 @@ MameNames::MameNames()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pugi::xml_node biosNode = doc.child("bios"); biosNode;
|
for (pugi::xml_node biosNode {doc.child("bios")}; biosNode;
|
||||||
biosNode = biosNode.next_sibling("bios")) {
|
biosNode = biosNode.next_sibling("bios")) {
|
||||||
std::string bios = biosNode.text().get();
|
std::string bios = biosNode.text().get();
|
||||||
mMameBioses.emplace_back(bios);
|
mMameBioses.emplace_back(bios);
|
||||||
|
@ -102,9 +102,9 @@ MameNames::MameNames()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pugi::xml_node deviceNode = doc.child("device"); deviceNode;
|
for (pugi::xml_node deviceNode {doc.child("device")}; deviceNode;
|
||||||
deviceNode = deviceNode.next_sibling("device")) {
|
deviceNode = deviceNode.next_sibling("device")) {
|
||||||
std::string device = deviceNode.text().get();
|
std::string device {deviceNode.text().get()};
|
||||||
mMameDevices.emplace_back(device);
|
mMameDevices.emplace_back(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
|
|
||||||
std::string getRealName(const std::string& mameName)
|
std::string getRealName(const std::string& mameName)
|
||||||
{
|
{
|
||||||
std::string name = mNamePairs[mameName];
|
std::string name {mNamePairs[mameName]};
|
||||||
if (name == "")
|
if (name == "")
|
||||||
return mameName;
|
return mameName;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue