mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-26 01:49:46 +00:00
Modernize std::find with ranges
This commit is contained in:
parent
b5f7a50874
commit
6ca7e2856b
7 changed files with 10 additions and 10 deletions
|
|
@ -77,7 +77,7 @@ std::optional<PatchEntry> DeserializeLine(std::string line)
|
|||
entry.conditional = true;
|
||||
}
|
||||
|
||||
const auto iter = std::find(s_patch_type_strings.begin(), s_patch_type_strings.end(), items[1]);
|
||||
const auto iter = std::ranges::find(s_patch_type_strings, items[1]);
|
||||
if (iter == s_patch_type_strings.end())
|
||||
return std::nullopt;
|
||||
entry.type = static_cast<PatchType>(std::distance(s_patch_type_strings.begin(), iter));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue