From 9fa4eb9aab4790ab370c92790de4f001eb50871e Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:20:16 -0700 Subject: Use 'contains' method --- .../InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface') diff --git a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm index 58de0c302e..5f0022c79b 100644 --- a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm +++ b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm @@ -179,7 +179,7 @@ std::string KeycodeToName(const CGKeyCode keycode) {kVK_RightOption, "Right Alt"}, }; - if (named_keys.find(keycode) != named_keys.end()) + if (named_keys.contains(keycode)) return named_keys.at(keycode); else return "Key " + std::to_string(keycode); -- cgit v1.2.3 From de1c47a70192a594c2435daa14b58950a613e2ce Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:23:07 -0700 Subject: Misc. Container Find Changes --- Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface') diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index e9f4f21980..e0ae924b83 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -102,7 +102,7 @@ protected: for (auto remove_prefix : {"BTN_", "KEY_"}) { - if (name.find(remove_prefix) == 0) + if (name.starts_with(remove_prefix)) return std::string(name.substr(std::strlen(remove_prefix))); } -- cgit v1.2.3