DiscIO: Rename RegionSwitch/CountrySwitch

Callers don't need to know that these functions are implemented
with a switch statement.
This commit is contained in:
JosJuice 2018-10-08 13:51:21 +02:00
parent 7fd1784b9a
commit f834ef1dfe
7 changed files with 22 additions and 14 deletions

View file

@ -97,14 +97,20 @@ static bool IsWiiTitle(const std::string& game_id)
static bool IsJapaneseGCTitle(const std::string& game_id)
{
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3], DiscIO::Platform::GameCubeDisc) ==
DiscIO::Country::Japan;
if (!IsGCTitle(game_id))
return false;
return DiscIO::CountryCodeToCountry(game_id[3], DiscIO::Platform::GameCubeDisc) ==
DiscIO::Country::Japan;
}
static bool IsNonJapaneseGCTitle(const std::string& game_id)
{
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3], DiscIO::Platform::GameCubeDisc) !=
DiscIO::Country::Japan;
if (!IsGCTitle(game_id))
return false;
return DiscIO::CountryCodeToCountry(game_id[3], DiscIO::Platform::GameCubeDisc) !=
DiscIO::Country::Japan;
}
// Note that this function will not overwrite entries that already are in the maps