diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-03 03:51:08 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-03 03:51:11 +0200 |
commit | 684fc2c32067cf450cd1e95c036c5337aa860718 (patch) | |
tree | 59c9f5035c879305364f591f1982634885121dc0 | |
parent | input_common: Add missing override specifiers (diff) | |
download | yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar.gz yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar.bz2 yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar.lz yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar.xz yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.tar.zst yuzu-684fc2c32067cf450cd1e95c036c5337aa860718.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/keyboard.cpp | 3 | ||||
-rw-r--r-- | src/input_common/sdl/sdl.cpp | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/input_common/keyboard.cpp b/src/input_common/keyboard.cpp index 0410ff328..525fe6abc 100644 --- a/src/input_common/keyboard.cpp +++ b/src/input_common/keyboard.cpp @@ -5,6 +5,7 @@ #include <atomic> #include <list> #include <mutex> +#include <utility> #include "input_common/keyboard.h" namespace InputCommon { @@ -12,7 +13,7 @@ namespace InputCommon { class KeyButton final : public Input::ButtonDevice { public: explicit KeyButton(std::shared_ptr<KeyButtonList> key_button_list_) - : key_button_list(key_button_list_) {} + : key_button_list(std::move(key_button_list_)) {} ~KeyButton() override; diff --git a/src/input_common/sdl/sdl.cpp b/src/input_common/sdl/sdl.cpp index 604d9a7d9..d1b960fd7 100644 --- a/src/input_common/sdl/sdl.cpp +++ b/src/input_common/sdl/sdl.cpp @@ -82,7 +82,7 @@ private: class SDLButton final : public Input::ButtonDevice { public: explicit SDLButton(std::shared_ptr<SDLJoystick> joystick_, int button_) - : joystick(joystick_), button(button_) {} + : joystick(std::move(joystick_)), button(button_) {} bool GetStatus() const override { return joystick->GetButton(button); @@ -96,7 +96,7 @@ private: class SDLDirectionButton final : public Input::ButtonDevice { public: explicit SDLDirectionButton(std::shared_ptr<SDLJoystick> joystick_, int hat_, Uint8 direction_) - : joystick(joystick_), hat(hat_), direction(direction_) {} + : joystick(std::move(joystick_)), hat(hat_), direction(direction_) {} bool GetStatus() const override { return joystick->GetHatDirection(hat, direction); @@ -112,7 +112,7 @@ class SDLAxisButton final : public Input::ButtonDevice { public: explicit SDLAxisButton(std::shared_ptr<SDLJoystick> joystick_, int axis_, float threshold_, bool trigger_if_greater_) - : joystick(joystick_), axis(axis_), threshold(threshold_), + : joystick(std::move(joystick_)), axis(axis_), threshold(threshold_), trigger_if_greater(trigger_if_greater_) {} bool GetStatus() const override { @@ -132,7 +132,7 @@ private: class SDLAnalog final : public Input::AnalogDevice { public: SDLAnalog(std::shared_ptr<SDLJoystick> joystick_, int axis_x_, int axis_y_) - : joystick(joystick_), axis_x(axis_x_), axis_y(axis_y_) {} + : joystick(std::move(joystick_)), axis_x(axis_x_), axis_y(axis_y_) {} std::tuple<float, float> GetStatus() const override { return joystick->GetAnalog(axis_x, axis_y); |