From 4825afb0187527d7eaa0ea3d903ad716a3eb9562 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Nov 2015 00:19:10 +0300 Subject: Convert enum InputType into strong typed. --- src/input/inputmanager.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/input/inputmanager.h') diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h index cc571c372..df759cacc 100644 --- a/src/input/inputmanager.h +++ b/src/input/inputmanager.h @@ -23,6 +23,8 @@ #include "input/inputfunction.h" +#include "enums/input/inputtype.h" + #include "events/inputevent.h" #include "utils/stringmap.h" @@ -77,10 +79,11 @@ class InputManager final std::string getKeyValueByNameLong(const std::string &keyName); void addActionKey(const InputActionT action, - const int type, + const InputTypeT type, const int val); - void setNewKey(const SDL_Event &event, const int type); + void setNewKey(const SDL_Event &event, + const InputTypeT type); void unassignKey(); @@ -106,12 +109,13 @@ class InputManager final void updateKeyActionMap(KeyToActionMap &actionMap, KeyToIdMap &idMap, KeyTimeMap &keyTimeMap, - const int type) const; + const InputType type) const; bool invokeKey(const InputActionData *const key, const InputActionT keyNum); - bool handleAssignKey(const SDL_Event &event, const int type); + bool handleAssignKey(const SDL_Event &event, + const InputTypeT type); static void handleRepeat(); @@ -119,7 +123,7 @@ class InputManager final InputActionT getKeyIndex(const int value, const int grp, - const int type) const A_WARN_UNUSED; + const InputTypeT type) const A_WARN_UNUSED; static void update(); -- cgit v1.2.3-60-g2f50