summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/inputmanager.cpp8
-rw-r--r--src/input/inputmanager.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 48bf1b083..7500116cf 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -439,8 +439,7 @@ std::string InputManager::getKeyValueString(const int index) const
std::string InputManager::getKeyValueByName(const std::string &keyName)
{
- const std::map<std::string, int>::const_iterator
- it = mNameMap.find(keyName);
+ const StringIntMapCIter it = mNameMap.find(keyName);
if (it == mNameMap.end())
return std::string();
@@ -449,8 +448,7 @@ std::string InputManager::getKeyValueByName(const std::string &keyName)
std::string InputManager::getKeyValueByNameLong(const std::string &keyName)
{
- const std::map<std::string, int>::const_iterator
- it = mNameMap.find(keyName);
+ const StringIntMapCIter it = mNameMap.find(keyName);
if (it == mNameMap.end())
return std::string();
@@ -770,7 +768,7 @@ bool InputManager::executeChatCommand(const std::string &cmd,
const std::string &args,
ChatTab *const tab)
{
- const std::map<std::string, int>::const_iterator it = mChatMap.find(cmd);
+ const StringIntMapCIter it = mChatMap.find(cmd);
if (it != mChatMap.end())
{
ActionFuncPtr func = *(inputActionData[(*it).second].action);
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h
index cb483e684..6205f2d11 100644
--- a/src/input/inputmanager.h
+++ b/src/input/inputmanager.h
@@ -26,6 +26,8 @@
#include "events/inputevent.h"
+#include "utils/stringmap.h"
+
#include <list>
#include <string>
#include <map>
@@ -142,8 +144,8 @@ class InputManager final
int mMask;
- std::map<std::string, int> mNameMap;
- std::map<std::string, int> mChatMap;
+ StringIntMap mNameMap;
+ StringIntMap mChatMap;
InputFunction mKey[InputAction::TOTAL];
};