mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 07:09:03 +00:00
Turn some non-const refs into pointers
This commit is contained in:
parent
7e39cf3b0d
commit
fa3cc05753
11 changed files with 106 additions and 71 deletions
|
@ -20,7 +20,7 @@ void LoadCodes(const IniFile& globalIni, const IniFile& localIni, std::vector<Ge
|
|||
for (const IniFile* ini : inis)
|
||||
{
|
||||
std::vector<std::string> lines;
|
||||
ini->GetLines("Gecko", lines, false);
|
||||
ini->GetLines("Gecko", &lines, false);
|
||||
|
||||
GeckoCode gcode;
|
||||
|
||||
|
@ -72,19 +72,25 @@ void LoadCodes(const IniFile& globalIni, const IniFile& localIni, std::vector<Ge
|
|||
|
||||
// add the last code
|
||||
if (gcode.name.size())
|
||||
{
|
||||
gcodes.push_back(gcode);
|
||||
}
|
||||
|
||||
ini->GetLines("Gecko_Enabled", lines, false);
|
||||
ini->GetLines("Gecko_Enabled", &lines, false);
|
||||
|
||||
for (auto line : lines)
|
||||
for (const std::string& line : lines)
|
||||
{
|
||||
if (line.size() == 0 || line[0] != '$')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
std::string name = line.substr(1);
|
||||
for (auto& ogcode : gcodes)
|
||||
for (GeckoCode& ogcode : gcodes)
|
||||
{
|
||||
if (ogcode.name == name)
|
||||
{
|
||||
ogcode.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue