From f4d4fb031a17c502a28d60a241c4fa6e838519f2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Dec 2015 17:46:20 +0300 Subject: Improve a bit inputmanager. --- src/input/inputmanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/input/inputmanager.cpp') diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 94cac4b05..48efe4719 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -971,11 +971,13 @@ InputActionT InputManager::getActionByKey(const SDL_Event &event) const return InputAction::NO_VALUE; } -void InputManager::addChatCommands(std::list &arr) +void InputManager::addChatCommands(std::list &restrict arr) + restrict { - for (int i = 0; i < static_cast(InputAction::TOTAL); i++) + const int sz = static_cast(InputAction::TOTAL); + for (int i = 0; i < sz; i++) { - const InputActionData &ad = inputActionData[i]; + const InputActionData &restrict ad = inputActionData[i]; std::string cmd = ad.chatCommand; if (!cmd.empty()) { -- cgit v1.2.3-70-g09d2