diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-30 15:05:17 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:54:17 -0800 |
| commit | 2b0cd16c8c266bc1e298e49d4009eab8c9c23f99 (patch) | |
| tree | f4d30b0b7bf7713dc50c468241a587423a4de35a /Source/Core/InputCommon/ControlReference/ExpressionParser.cpp | |
| parent | 140252ffc0ae71e8b5309bff7d6550189c602702 (diff) | |
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.
Diffstat (limited to 'Source/Core/InputCommon/ControlReference/ExpressionParser.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControlReference/ExpressionParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp index dd897c2535..7fdf677a91 100644 --- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp +++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp @@ -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); + }); }); } |
