summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-10-18 00:15:39 +0200
committerLioncash <mathew1800@gmail.com>2019-10-18 00:16:36 +0200
commit26c84718c86272a9049945ade3bae19acc459cf3 (patch)
treec6b26470e8de1826d5eef87eee6012b479402799
parenthid/npad: Remove redundant non-const variant of IsControllerSupported() (diff)
downloadyuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar.gz
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar.bz2
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar.lz
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar.xz
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.tar.zst
yuzu-26c84718c86272a9049945ade3bae19acc459cf3.zip
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index ed31b3bad..27fc7a79b 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -629,25 +629,24 @@ void Controller_NPad::ClearAllConnectedControllers() {
}
void Controller_NPad::DisconnectAllConnectedControllers() {
- std::for_each(connected_controllers.begin(), connected_controllers.end(),
- [](ControllerHolder& controller) { controller.is_connected = false; });
+ for (ControllerHolder& controller : connected_controllers) {
+ controller.is_connected = false;
+ }
}
void Controller_NPad::ConnectAllDisconnectedControllers() {
- std::for_each(connected_controllers.begin(), connected_controllers.end(),
- [](ControllerHolder& controller) {
- if (controller.type != NPadControllerType::None && !controller.is_connected) {
- controller.is_connected = false;
- }
- });
+ for (ControllerHolder& controller : connected_controllers) {
+ if (controller.type != NPadControllerType::None && !controller.is_connected) {
+ controller.is_connected = false;
+ }
+ }
}
void Controller_NPad::ClearAllControllers() {
- std::for_each(connected_controllers.begin(), connected_controllers.end(),
- [](ControllerHolder& controller) {
- controller.type = NPadControllerType::None;
- controller.is_connected = false;
- });
+ for (ControllerHolder& controller : connected_controllers) {
+ controller.type = NPadControllerType::None;
+ controller.is_connected = false;
+ }
}
u32 Controller_NPad::GetAndResetPressState() {