diff options
| author | 2021-11-01 14:17:53 -0600 | |
|---|---|---|
| committer | 2021-11-24 20:30:26 -0600 | |
| commit | 77fa4d4bf60526826ef8b53ee3870f7d2a761976 (patch) | |
| tree | 3c6c07d535bd912ed085be9b826103a6eabe718f /src/input_common/input_engine.cpp | |
| parent | settings: Fix Debug controller type options (diff) | |
| download | yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.gz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.xz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.zip | |
second commit lion review
Diffstat (limited to 'src/input_common/input_engine.cpp')
| -rw-r--r-- | src/input_common/input_engine.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp index 965a2bdf1..139d8d2e6 100644 --- a/src/input_common/input_engine.cpp +++ b/src/input_common/input_engine.cpp | |||
| @@ -353,11 +353,12 @@ void InputEngine::SetMappingCallback(MappingCallback callback) { | |||
| 353 | 353 | ||
| 354 | void InputEngine::DeleteCallback(int key) { | 354 | void InputEngine::DeleteCallback(int key) { |
| 355 | std::lock_guard lock{mutex_callback}; | 355 | std::lock_guard lock{mutex_callback}; |
| 356 | if (!callback_list.contains(key)) { | 356 | const auto& iterator = callback_list.find(key); |
| 357 | if (iterator == callback_list.end()) { | ||
| 357 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); | 358 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); |
| 358 | return; | 359 | return; |
| 359 | } | 360 | } |
| 360 | callback_list.erase(key); | 361 | callback_list.erase(iterator); |
| 361 | } | 362 | } |
| 362 | 363 | ||
| 363 | } // namespace InputCommon | 364 | } // namespace InputCommon |