summaryrefslogtreecommitdiff
path: root/src/input_common/keyboard.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-10-14 02:51:14 -0400
committerGravatar Lioncash2020-10-15 19:37:51 -0400
commit046c0c91a3ed665531f20955e7cfb86fe5b73213 (patch)
tree94382af9cc339cf5f384f4d0c8938dd593b4e1c5 /src/input_common/keyboard.cpp
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.gz
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.xz
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.zip
input_common/CMakeLists: Make some warnings errors
Makes the input_common code warnings consistent with the rest of the codebase.
Diffstat (limited to 'src/input_common/keyboard.cpp')
-rw-r--r--src/input_common/keyboard.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_common/keyboard.cpp b/src/input_common/keyboard.cpp
index afb8e6612..24a6f7a33 100644
--- a/src/input_common/keyboard.cpp
+++ b/src/input_common/keyboard.cpp
@@ -49,8 +49,9 @@ public:
49 void ChangeKeyStatus(int key_code, bool pressed) { 49 void ChangeKeyStatus(int key_code, bool pressed) {
50 std::lock_guard guard{mutex}; 50 std::lock_guard guard{mutex};
51 for (const KeyButtonPair& pair : list) { 51 for (const KeyButtonPair& pair : list) {
52 if (pair.key_code == key_code) 52 if (pair.key_code == key_code) {
53 pair.key_button->status.store(pressed); 53 pair.key_button->status.store(pressed);
54 }
54 } 55 }
55 } 56 }
56 57
@@ -73,7 +74,7 @@ KeyButton::~KeyButton() {
73} 74}
74 75
75std::unique_ptr<Input::ButtonDevice> Keyboard::Create(const Common::ParamPackage& params) { 76std::unique_ptr<Input::ButtonDevice> Keyboard::Create(const Common::ParamPackage& params) {
76 int key_code = params.Get("code", 0); 77 const int key_code = params.Get("code", 0);
77 std::unique_ptr<KeyButton> button = std::make_unique<KeyButton>(key_button_list); 78 std::unique_ptr<KeyButton> button = std::make_unique<KeyButton>(key_button_list);
78 key_button_list->AddKeyButton(key_code, button.get()); 79 key_button_list->AddKeyButton(key_code, button.get());
79 return button; 80 return button;