mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
This commit is contained in:
@ -613,11 +613,10 @@ bool GameFile::CheckIfTwoDiscGame(const std::string& game_id) const
|
||||
"S6T",
|
||||
"SDQ",
|
||||
};
|
||||
static_assert(std::is_sorted(two_disc_game_id_prefixes.begin(), two_disc_game_id_prefixes.end()));
|
||||
static_assert(std::ranges::is_sorted(two_disc_game_id_prefixes));
|
||||
|
||||
std::string_view game_id_prefix(game_id.data(), GAME_ID_PREFIX_SIZE);
|
||||
return std::binary_search(two_disc_game_id_prefixes.begin(), two_disc_game_id_prefixes.end(),
|
||||
game_id_prefix);
|
||||
return std::ranges::binary_search(two_disc_game_id_prefixes, game_id_prefix);
|
||||
}
|
||||
|
||||
std::string GameFile::GetNetPlayName(const Core::TitleDatabase& title_database) const
|
||||
|
@ -225,7 +225,7 @@ void SetLocale(std::string locale_name)
|
||||
if (locale_name == "en")
|
||||
locale_name = "en_GB";
|
||||
|
||||
std::replace(locale_name.begin(), locale_name.end(), OTHER_SEPARATOR, PREFERRED_SEPARATOR);
|
||||
std::ranges::replace(locale_name, OTHER_SEPARATOR, PREFERRED_SEPARATOR);
|
||||
|
||||
// Use the specified locale if supported.
|
||||
if (set_locale(locale_name))
|
||||
|
Reference in New Issue
Block a user