diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-18 19:12:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-18 19:12:47 +0300 |
commit | fe504040c415c8d2692dcbd1c6374ae52ee52777 (patch) | |
tree | 4cac2e57a86c61af6711af303124611cc2e8d2f8 /src/input/inputmanager.cpp | |
parent | 43159aed2516e648c9d050b3312aa7678d2fae05 (diff) | |
download | plus-fe504040c415c8d2692dcbd1c6374ae52ee52777.tar.gz plus-fe504040c415c8d2692dcbd1c6374ae52ee52777.tar.bz2 plus-fe504040c415c8d2692dcbd1c6374ae52ee52777.tar.xz plus-fe504040c415c8d2692dcbd1c6374ae52ee52777.zip |
Remove extra checks.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r-- | src/input/inputmanager.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index a49f7ab49..1f9869d4d 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -894,10 +894,6 @@ void InputManager::updateKeyActionMap(KeyToActionMap &restrict actionMap, { actionMap[ki.value].push_back( static_cast<InputActionT>(i)); - logger->log("add key: %d, action: %d, size: %ld", - ki.value, - CAST_S32(i), - static_cast<long>(actionMap[ki.value].size())); } } } @@ -927,32 +923,8 @@ void InputManager::updateKeyActionMap(KeyToActionMap &restrict actionMap, KeysVector *const keys = &it->second; if (!keys) continue; - const size_t sz = keys->size(); - if (sz > 1) - { - logger->log("actions size: key: %d, size: %d", - it->first, - CAST_S32(sz)); - int sum = 0; - FOR_EACHP (KeysVectorIter, itk, keys) - { - const size_t val = CAST_SIZE(*itk); - if (val >= CAST_SIZE(InputAction::TOTAL)) - { - logger->log("wrong action index: %ld", - static_cast<long>(val)); - break; - } - else - { - logger->log("action index: %ld", - static_cast<long>(val)); - } - sum += inputActionData[val].priority; - } - logger->log("sum: %d", sum); + if (keys->size() > 1) std::sort(keys->begin(), keys->end(), inputActionDataSorter); - } } } |