diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-02 21:51:08 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-02 21:51:11 -0400 |
commit | 684fc2c32067cf450cd1e95c036c5337aa860718 (patch) | |
tree | 59c9f5035c879305364f591f1982634885121dc0 /src/input_common/keyboard.cpp | |
parent | 29b6afb82f39a9f21389e2d9ee65ff6cdd909db8 (diff) |
input_common: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements
Diffstat (limited to 'src/input_common/keyboard.cpp')
-rw-r--r-- | src/input_common/keyboard.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_common/keyboard.cpp b/src/input_common/keyboard.cpp index 0410ff3288..525fe6abcf 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; |