Reduce the indentation level of MapINIToRealLocation
This commit is contained in:
parent
3eeab02ee2
commit
5296ee6d3d
|
@ -138,8 +138,9 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std
|
|||
static const INIToLocationMap& ini_to_location = GetINIToLocationMap();
|
||||
|
||||
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
|
||||
// Certain sections like 'Speedhacks' has keys that are variable
|
||||
it = ini_to_location.find({section, ""});
|
||||
|
@ -165,9 +166,6 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std
|
|||
return {Config::System::Main, "", ""};
|
||||
}
|
||||
|
||||
return ini_to_location.at({section, key});
|
||||
}
|
||||
|
||||
static std::pair<std::string, std::string> GetINILocationFromConfig(const ConfigLocation& location)
|
||||
{
|
||||
static const INIToLocationMap& ini_to_location = GetINIToLocationMap();
|
||||
|
|
Loading…
Reference in New Issue