diff --git a/Source/Core/Core/GeckoCodeConfig.cpp b/Source/Core/Core/GeckoCodeConfig.cpp index 8cae3d8b68..541537f3a4 100644 --- a/Source/Core/Core/GeckoCodeConfig.cpp +++ b/Source/Core/Core/GeckoCodeConfig.cpp @@ -17,10 +17,10 @@ std::vector LoadCodes(const IniFile& globalIni, const IniFile& localI { std::vector gcodes; - for (const IniFile& ini : {globalIni, localIni}) + for (const IniFile* ini : {&globalIni, &localIni}) { std::vector lines; - ini.GetLines("Gecko", &lines, false); + ini->GetLines("Gecko", &lines, false); GeckoCode gcode; @@ -42,7 +42,7 @@ std::vector LoadCodes(const IniFile& globalIni, const IniFile& localI gcodes.push_back(gcode); gcode = GeckoCode(); gcode.enabled = (1 == ss.tellg()); // silly - gcode.user_defined = (&ini == &localIni); + gcode.user_defined = (ini == &localIni); ss.seekg(1, std::ios_base::cur); // read the code name std::getline(ss, gcode.name, '['); // stop at [ character (beginning of contributor name) @@ -75,7 +75,7 @@ std::vector LoadCodes(const IniFile& globalIni, const IniFile& localI gcodes.push_back(gcode); } - ini.GetLines("Gecko_Enabled", &lines, false); + ini->GetLines("Gecko_Enabled", &lines, false); for (const std::string& line : lines) {