Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of

Ranges Algorithms Modernization - Of
This commit is contained in:
JMC47
2024-12-26 16:51:53 -05:00
committed by GitHub
59 changed files with 148 additions and 166 deletions

View File

@ -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;