diff options
| author | Lioncash <mathew1800@gmail.com> | 2021-12-13 09:23:19 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2021-12-13 09:23:23 -0500 |
| commit | e0e9f98fc673c65cf22ef0bdb333b1128b9f2b81 (patch) | |
| tree | d59ac2ac61a00afc1776ac8daf6a2a286fa29e43 /src/input_common/input_engine.cpp | |
| parent | cd45635f563460541af925ba4a566d6f95dc0989 (diff) | |
input_engine: std::move InputIdentifier in SetCallback()
Allows avoiding std::function allocations.
Diffstat (limited to 'src/input_common/input_engine.cpp')
| -rw-r--r-- | src/input_common/input_engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp index 2b2105376f..6b057e2f13 100644 --- a/src/input_common/input_engine.cpp +++ b/src/input_common/input_engine.cpp @@ -342,7 +342,7 @@ const std::string& InputEngine::GetEngineName() const { int InputEngine::SetCallback(InputIdentifier input_identifier) { std::lock_guard lock{mutex_callback}; - callback_list.insert_or_assign(last_callback_key, input_identifier); + callback_list.insert_or_assign(last_callback_key, std::move(input_identifier)); return last_callback_key++; } |
