mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Modernize std::none_of
with ranges
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to 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. In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
This commit is contained in:
@ -171,6 +171,6 @@ std::string UnescapeFileName(const std::string& filename)
|
||||
bool IsFileNameSafe(const std::string_view filename)
|
||||
{
|
||||
return !filename.empty() && !std::ranges::all_of(filename, [](char c) { return c == '.'; }) &&
|
||||
std::none_of(filename.begin(), filename.end(), IsIllegalCharacter);
|
||||
std::ranges::none_of(filename, IsIllegalCharacter);
|
||||
}
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user