summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-20 22:17:29 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2025-01-01 09:52:03 -0800
commit110d32729ecbe5b19df9b2cc76de630334410589 (patch)
tree0032af6f60d1b8575bc5bfcbefb8c3faa951d96f /Source/Core/InputCommon/ControllerInterface
parent6f10acea3fee4d08c4e52e66f862da45ad06d1ed (diff)
Simplify `std::find` with `Common::Contains`
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Android/Android.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp
index b67974509b..b6e03e73a0 100644
--- a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp
@@ -18,6 +18,7 @@
#include <jni.h>
#include "Common/Assert.h"
+#include "Common/Contains.h"
#include "Common/Logging/Log.h"
#include "Common/StringUtil.h"
@@ -1132,8 +1133,7 @@ Java_org_dolphinemu_dolphinemu_features_input_model_ControllerInterface_notifySe
for (ciface::Core::Device::Input* input : device->Inputs())
{
- const std::string input_name = input->GetName();
- if (std::find(axis_names.begin(), axis_names.end(), input_name) != axis_names.end())
+ if (Common::Contains(axis_names, input->GetName()))
{
auto casted_input = static_cast<ciface::Android::AndroidSensorAxis*>(input);
casted_input->NotifyIsSuspended(static_cast<bool>(suspended));