Modernize std::find_if with ranges
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
This commit is contained in:
1 parent
6ca7e2856b
commit
e4fb837f4b
24 files changed
+60
-72
No files matched your search
@@ -366,7 +366,7 @@ static FSTBuilderNode* FindFileNodeInFST(std::string_view path, std::vector<FSTB
|
||||
const size_t path_separator = path.find('/');
|
||||
const bool is_file = path_separator == std::string_view::npos;
|
||||
const std::string_view name = is_file ? path : path.substr(0, path_separator);
|
||||
const auto it = std::find_if(fst->begin(), fst->end(), [&](const FSTBuilderNode& node) {
|
||||
const auto it = std::ranges::find_if(*fst, [&](const FSTBuilderNode& node) {
|
||||
return Common::CaseInsensitiveEquals(node.m_filename, name);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user