diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-03 06:18:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 06:18:52 +0200 |
commit | 9e48ca23b2522ba60138641a587ada0694d27c47 (patch) | |
tree | 045c1f47c8ff1dd968f69d706b35861319ece363 /src/input_common/sdl | |
parent | Merge pull request #907 from lioncash/slot (diff) | |
parent | input_common: Use std::move where applicable (diff) | |
download | yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar.gz yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar.bz2 yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar.lz yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar.xz yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.tar.zst yuzu-9e48ca23b2522ba60138641a587ada0694d27c47.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/sdl/sdl.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/input_common/sdl/sdl.cpp b/src/input_common/sdl/sdl.cpp index 8d117c2d4..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); @@ -314,10 +314,6 @@ namespace Polling { class SDLPoller : public InputCommon::Polling::DevicePoller { public: - SDLPoller() = default; - - ~SDLPoller() = default; - void Start() override { // SDL joysticks must be opened, otherwise they don't generate events SDL_JoystickUpdate(); @@ -341,10 +337,6 @@ private: class SDLButtonPoller final : public SDLPoller { public: - SDLButtonPoller() = default; - - ~SDLButtonPoller() = default; - Common::ParamPackage GetNextInput() override { SDL_Event event; while (SDL_PollEvent(&event)) { @@ -364,10 +356,6 @@ public: class SDLAnalogPoller final : public SDLPoller { public: - SDLAnalogPoller() = default; - - ~SDLAnalogPoller() = default; - void Start() override { SDLPoller::Start(); |