mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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.
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user