summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/input/inputmanager.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index b0aa18da5..dbe82d5da 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -841,11 +841,13 @@ void InputManager::executeAction(const InputActionT keyNum) restrict2
if (keyNum < InputAction::MOVE_UP || keyNum >= InputAction::TOTAL)
return;
- InputEvent evt(keyNum, mMask);
ActionFuncPtr func = *(inputActionData[CAST_SIZE(
keyNum)].action);
if (func != nullptr)
+ {
+ InputEvent evt(keyNum, mMask);
func(evt);
+ }
}
bool InputManager::executeChatCommand(const std::string &restrict cmd,