diff options
| author | JMC47 <JMC4789@gmail.com> | 2025-03-23 15:56:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-23 15:56:13 -0400 |
| commit | ad3650abfcae6432338ba976123958ee67a4106c (patch) | |
| tree | 23def284c9a42648ea0779f94903ba43903aa353 /Source/Core/DiscIO/RiivolutionParser.cpp | |
| parent | 1515cf6ccdd1ba206c8e0eaabad07de28a4f5939 (diff) | |
| parent | e4efe011d71b668537bc551996848e911de079ab (diff) | |
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
Diffstat (limited to 'Source/Core/DiscIO/RiivolutionParser.cpp')
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionParser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/RiivolutionParser.cpp b/Source/Core/DiscIO/RiivolutionParser.cpp index f120335f56..471813f198 100644 --- a/Source/Core/DiscIO/RiivolutionParser.cpp +++ b/Source/Core/DiscIO/RiivolutionParser.cpp @@ -146,8 +146,7 @@ std::optional<Disc> ParseString(std::string_view xml, std::string xml_path) const std::string macro_id = macro_node.attribute("id").as_string(); for (auto& section : disc.m_sections) { - auto option_to_clone = std::find_if(section.m_options.begin(), section.m_options.end(), - [&](const Option& o) { return o.m_id == macro_id; }); + auto option_to_clone = std::ranges::find(section.m_options, macro_id, &Option::m_id); if (option_to_clone == section.m_options.end()) continue; @@ -305,8 +304,7 @@ std::vector<Patch> Disc::GeneratePatches(const std::string& game_id) const const Choice& choice = option.m_choices[selected - 1]; for (const auto& patch_ref : choice.m_patch_references) { - const auto patch = std::find_if(m_patches.begin(), m_patches.end(), - [&](const Patch& p) { return patch_ref.m_id == p.m_id; }); + const auto patch = std::ranges::find(m_patches, patch_ref.m_id, &Patch::m_id); if (patch == m_patches.end()) continue; |
