mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 14:49:22 +00:00
Reduce the indentation level of MapINIToRealLocation
This commit is contained in:
parent
3eeab02ee2
commit
5296ee6d3d
1 changed files with 21 additions and 23 deletions
|
@ -138,8 +138,9 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std
|
||||||
static const INIToLocationMap& ini_to_location = GetINIToLocationMap();
|
static const INIToLocationMap& ini_to_location = GetINIToLocationMap();
|
||||||
|
|
||||||
auto it = ini_to_location.find({section, key});
|
auto it = ini_to_location.find({section, key});
|
||||||
if (it == ini_to_location.end())
|
if (it != ini_to_location.end())
|
||||||
{
|
return it->second;
|
||||||
|
|
||||||
// Try again, but this time with an empty key
|
// Try again, but this time with an empty key
|
||||||
// Certain sections like 'Speedhacks' has keys that are variable
|
// Certain sections like 'Speedhacks' has keys that are variable
|
||||||
it = ini_to_location.find({section, ""});
|
it = ini_to_location.find({section, ""});
|
||||||
|
@ -163,9 +164,6 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std
|
||||||
|
|
||||||
WARN_LOG(CORE, "Unknown game INI option in section %s: %s", section.c_str(), key.c_str());
|
WARN_LOG(CORE, "Unknown game INI option in section %s: %s", section.c_str(), key.c_str());
|
||||||
return {Config::System::Main, "", ""};
|
return {Config::System::Main, "", ""};
|
||||||
}
|
|
||||||
|
|
||||||
return ini_to_location.at({section, key});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::pair<std::string, std::string> GetINILocationFromConfig(const ConfigLocation& location)
|
static std::pair<std::string, std::string> GetINILocationFromConfig(const ConfigLocation& location)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue