mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55: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;
|
||||
}
|
||||
|
||||
for (pugi::xml_node gameNode = doc.child("game"); gameNode;
|
||||
for (pugi::xml_node gameNode {doc.child("game")}; gameNode;
|
||||
gameNode = gameNode.next_sibling("game")) {
|
||||
mNamePairs[gameNode.child("mamename").text().get()] =
|
||||
gameNode.child("realname").text().get();
|
||||
|
@ -75,7 +75,7 @@ MameNames::MameNames()
|
|||
return;
|
||||
}
|
||||
|
||||
for (pugi::xml_node biosNode = doc.child("bios"); biosNode;
|
||||
for (pugi::xml_node biosNode {doc.child("bios")}; biosNode;
|
||||
biosNode = biosNode.next_sibling("bios")) {
|
||||
std::string bios = biosNode.text().get();
|
||||
mMameBioses.emplace_back(bios);
|
||||
|
@ -102,9 +102,9 @@ MameNames::MameNames()
|
|||
return;
|
||||
}
|
||||
|
||||
for (pugi::xml_node deviceNode = doc.child("device"); deviceNode;
|
||||
for (pugi::xml_node deviceNode {doc.child("device")}; deviceNode;
|
||||
deviceNode = deviceNode.next_sibling("device")) {
|
||||
std::string device = deviceNode.text().get();
|
||||
std::string device {deviceNode.text().get()};
|
||||
mMameDevices.emplace_back(device);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
std::string getRealName(const std::string& mameName)
|
||||
{
|
||||
std::string name = mNamePairs[mameName];
|
||||
std::string name {mNamePairs[mameName]};
|
||||
if (name == "")
|
||||
return mameName;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue