diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-31 00:19:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-31 00:19:18 +0300 |
commit | 694e07d193e7c5758a7d672b45668651b034003d (patch) | |
tree | 20a4aec8dee2b3b5475db9f3667e797fb43c603b /src/input/keyinput.h | |
parent | c9a84749b3b71d4df6cc3b9b488d60dc4a013a20 (diff) | |
download | plus-694e07d193e7c5758a7d672b45668651b034003d.tar.gz plus-694e07d193e7c5758a7d672b45668651b034003d.tar.bz2 plus-694e07d193e7c5758a7d672b45668651b034003d.tar.xz plus-694e07d193e7c5758a7d672b45668651b034003d.zip |
Convert InputAction enum into strong typed enum.
Diffstat (limited to 'src/input/keyinput.h')
-rw-r--r-- | src/input/keyinput.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/input/keyinput.h b/src/input/keyinput.h index 8555d8bbb..229b4d212 100644 --- a/src/input/keyinput.h +++ b/src/input/keyinput.h @@ -66,6 +66,8 @@ #include "enums/events/keyeventtype.h" +#include "enums/input/inputaction.h" + #include "input/key.h" #include "localconsts.h" @@ -79,7 +81,7 @@ class KeyInput final #ifdef USE_SDL2 mText(), #endif - mActionId(-2) + mActionId(InputAction::UNDEFINED_VALUE) { } ~KeyInput() @@ -105,12 +107,12 @@ class KeyInput final return mKey; } - void setActionId(const int n) + void setActionId(const InputActionT n) { mActionId = n; } - int getActionId() const A_WARN_UNUSED + InputActionT getActionId() const A_WARN_UNUSED { return mActionId; } @@ -142,7 +144,7 @@ class KeyInput final std::string mText; #endif - int mActionId; + InputActionT mActionId; }; #endif // INPUT_KEYINPUT_H |