diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-30 17:26:50 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:54:16 -0800 |
| commit | 140252ffc0ae71e8b5309bff7d6550189c602702 (patch) | |
| tree | 7e6fe317fc93e0d9fc91e089ec3af86af25565f1 /Source/Core/Common/FileSearch.cpp | |
| parent | 860e6cf5cb7d96499aecf6f6067783bdb71c29ad (diff) | |
Modernize `std::any_of` with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.
In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
Diffstat (limited to 'Source/Core/Common/FileSearch.cpp')
| -rw-r--r-- | Source/Core/Common/FileSearch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index 4a54c978c9..ac82b9ebd6 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -41,7 +41,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie // N.B. This avoids doing any copies auto ext_matches = [&native_exts](const fs::path& path) { const std::basic_string_view<fs::path::value_type> native_path = path.native(); - return std::any_of(native_exts.cbegin(), native_exts.cend(), [&native_path](const auto& ext) { + return std::ranges::any_of(native_exts, [&native_path](const auto& ext) { const auto compare_len = ext.native().length(); if (native_path.length() < compare_len) return false; |
