diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 9b75d07e0d..3a6ee36b3c 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -26,7 +26,7 @@ std::string GameDatabaseSchema::GameEntry::memcardFiltersAsString() return ""; std::string filters; - for (int i = 0; i < memcardFilters.size(); i++) + for (u32 i = 0; i < memcardFilters.size(); i++) { std::string f = memcardFilters.at(i); filters.append(f); @@ -93,7 +93,7 @@ GameDatabaseSchema::GameEntry YamlGameDatabaseImpl::entryFromYaml(const std::str bool fixValidated = false; for (GamefixId id = GamefixId_FIRST; id < pxEnumEnd; ++id) { - std::string validFix = wxString(EnumToString(id)).ToStdString() + L"Hack"; + std::string validFix = wxString(EnumToString(id)).Append(L"Hack").ToStdString(); if (validFix == fix) { fixValidated = true; diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index b1b42f1849..3f85b97056 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -311,8 +311,8 @@ static int loadGameSettings(Pcsx2Config& dest, const GameDatabaseSchema::GameEnt // TODO - config - this could be simplified with maps instead of bitfields and enums for (GamefixId id = GamefixId_FIRST; id < pxEnumEnd; ++id) { - std::string key = wxString(EnumToString(id)) + L"Hack"; - + std::string key = wxString(EnumToString(id)).Append(L"Hack").ToStdString(); + // Gamefixes are already guaranteed to be valid, any invalid ones are dropped if (std::find(game.gameFixes.begin(), game.gameFixes.end(), key) != game.gameFixes.end()) {