summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-29 11:43:52 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-12-15 19:50:34 -0800
commit860e6cf5cb7d96499aecf6f6067783bdb71c29ad (patch)
tree212a451cbdd72d6525703c2f1369198fbdbe2b85 /Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp
parent826e2bbf98ca5c6088c3d19968272b29fc335972 (diff)
Modernize `std::all_of` with ranges
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed. In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp
index dfd282d533..d6cb4b95ff 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/IMUAccelerometer.cpp
@@ -25,8 +25,8 @@ IMUAccelerometer::IMUAccelerometer(std::string name_, std::string ui_name_)
bool IMUAccelerometer::AreInputsBound() const
{
- return std::all_of(controls.begin(), controls.end(),
- [](const auto& control) { return control->control_ref->BoundCount() > 0; });
+ return std::ranges::all_of(
+ controls, [](const auto& control) { return control->control_ref->BoundCount() > 0; });
}
std::optional<IMUAccelerometer::StateData> IMUAccelerometer::GetState() const