diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-30 17:26:50 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:54:16 -0800 |
| commit | 140252ffc0ae71e8b5309bff7d6550189c602702 (patch) | |
| tree | 7e6fe317fc93e0d9fc91e089ec3af86af25565f1 /Source/Core/InputCommon/ControllerEmu | |
| parent | 860e6cf5cb7d96499aecf6f6067783bdb71c29ad (diff) | |
Modernize `std::any_of` with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able 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.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUGyroscope.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUGyroscope.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUGyroscope.cpp index 0ad720dcdb..787665b366 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUGyroscope.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUGyroscope.cpp @@ -90,8 +90,8 @@ void IMUGyroscope::UpdateCalibration(const StateData& state) // Check for required calibration update frequency // and if current data is within deadzone distance of mean stable value. if (calibration_freq < WORST_ACCEPTABLE_CALIBRATION_UPDATE_FREQUENCY || - std::any_of(current_difference.data.begin(), current_difference.data.end(), - [&](auto c) { return std::abs(c) > deadzone; })) + std::ranges::any_of(current_difference.data, + [&](auto c) { return std::abs(c) > deadzone; })) { RestartCalibration(); } |
