mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-28 23:38:49 +00: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:
parent
140252ffc0
commit
2b0cd16c8c
7 changed files with 20 additions and 27 deletions
|
@ -305,9 +305,10 @@ bool HotkeySuppressions::IsSuppressedIgnoringModifiers(Device::Input* input,
|
|||
return i1 && i2 && (i1 == i2 || i1->IsChild(i2) || i2->IsChild(i1));
|
||||
};
|
||||
|
||||
return std::any_of(it, it_end, [&](auto& s) {
|
||||
return std::none_of(begin(ignore_modifiers), end(ignore_modifiers),
|
||||
[&](auto& m) { return is_same_modifier(m->GetInput(), s.first.second); });
|
||||
return std::any_of(it, it_end, [&](const auto& s) {
|
||||
return std::ranges::none_of(ignore_modifiers, [&](const auto& m) {
|
||||
return is_same_modifier(m->GetInput(), s.first.second);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue