input_common: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements
This commit is contained in:
parent
29b6afb82f
commit
684fc2c320
2 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue