mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Modernize std::is_sorted
with ranges
In OGLConfig.cpp, `std::views::reverse` is used rather than sorting using `std::ranges::greater` in order to parallel other instances of reverse iteration in the function.
This commit is contained in:
parent
ebf7cebc32
commit
01d0bdf1bb
2 changed files with 4 additions and 3 deletions
|
@ -613,7 +613,7 @@ 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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue