diff options
| author | 2021-12-13 09:23:19 -0500 | |
|---|---|---|
| committer | 2021-12-13 09:23:23 -0500 | |
| commit | a92dbec96242fe246de99878b12e217b3087463e (patch) | |
| tree | d59ac2ac61a00afc1776ac8daf6a2a286fa29e43 | |
| parent | input_engine: Pass LedStatus by const reference (diff) | |
| download | yuzu-a92dbec96242fe246de99878b12e217b3087463e.tar.gz yuzu-a92dbec96242fe246de99878b12e217b3087463e.tar.xz yuzu-a92dbec96242fe246de99878b12e217b3087463e.zip | |
input_engine: std::move InputIdentifier in SetCallback()
Allows avoiding std::function allocations.
Diffstat (limited to '')
| -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 2b2105376..6b057e2f1 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 { | |||
| 342 | 342 | ||
| 343 | int InputEngine::SetCallback(InputIdentifier input_identifier) { | 343 | int InputEngine::SetCallback(InputIdentifier input_identifier) { |
| 344 | std::lock_guard lock{mutex_callback}; | 344 | std::lock_guard lock{mutex_callback}; |
| 345 | callback_list.insert_or_assign(last_callback_key, input_identifier); | 345 | callback_list.insert_or_assign(last_callback_key, std::move(input_identifier)); |
| 346 | return last_callback_key++; | 346 | return last_callback_key++; |
| 347 | } | 347 | } |
| 348 | 348 | ||