From 267e547122a45d6c78e08317c04926b145aed5d6 Mon Sep 17 00:00:00 2001 From: Tomas Jakobsson Date: Thu, 15 Feb 2018 15:03:42 +0100 Subject: [PATCH] Rename MameNames::names to MameNAmes::mNamePairs --- es-core/src/MameNames.cpp | 8 ++++---- es-core/src/MameNames.h | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/es-core/src/MameNames.cpp b/es-core/src/MameNames.cpp index ed998b2d5..78743b5dd 100644 --- a/es-core/src/MameNames.cpp +++ b/es-core/src/MameNames.cpp @@ -55,7 +55,7 @@ MameNames::MameNames() for(pugi::xml_node gameNode = doc.child("game"); gameNode; gameNode = gameNode.next_sibling("game")) { NamePair namePair = { gameNode.child("mamename").text().get(), gameNode.child("realname").text().get() }; - names.push_back(namePair); + mNamePairs.push_back(namePair); } } // MameNames @@ -68,16 +68,16 @@ MameNames::~MameNames() std::string MameNames::getRealName(const std::string& _mameName) { size_t start = 0; - size_t end = names.size(); + size_t end = mNamePairs.size(); while(start < end) { const size_t index = (start + end) / 2; - const int compare = strcmp(names[index].mameName.c_str(), _mameName.c_str()); + const int compare = strcmp(mNamePairs[index].mameName.c_str(), _mameName.c_str()); if(compare < 0) start = index + 1; else if( compare > 0) end = index; - else return names[index].realName; + else return mNamePairs[index].realName; } return _mameName; diff --git a/es-core/src/MameNames.h b/es-core/src/MameNames.h index 5f8bb4634..52fd71455 100644 --- a/es-core/src/MameNames.h +++ b/es-core/src/MameNames.h @@ -5,8 +5,6 @@ #include #include -namespace CEC { class ICECAdapter; } - class MameNames { public: @@ -31,7 +29,7 @@ private: static MameNames* sInstance; - namePairVector names; + namePairVector mNamePairs; }; // MameNames