summaryrefslogtreecommitdiff
path: root/src/input/keyboardconfig.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/input/keyboardconfig.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmanaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/input/keyboardconfig.cpp')
-rw-r--r--src/input/keyboardconfig.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp
index 9c82dd0d0..2c821807b 100644
--- a/src/input/keyboardconfig.cpp
+++ b/src/input/keyboardconfig.cpp
@@ -65,7 +65,7 @@ int KeyboardConfig::getKeyValueFromEvent(const SDL_Event &event)
return event.key.keysym.scancode;
#else
if (event.key.keysym.sym)
- return static_cast<int>(event.key.keysym.sym);
+ return CAST_S32(event.key.keysym.sym);
else if (event.key.keysym.scancode > 1)
return -event.key.keysym.scancode;
return 0;
@@ -98,7 +98,7 @@ std::string KeyboardConfig::getKeyName(const int key)
}
// TRANSLATORS: long key name, should be short
- return strprintf(_("key_%d"), static_cast<int>(key));
+ return strprintf(_("key_%d"), CAST_S32(key));
}
std::string KeyboardConfig::getKeyShortString(const std::string &key)
@@ -266,7 +266,7 @@ void KeyboardConfig::handleRepeat(const int time)
{
int &keyTime = (*it).second;
if (time > keyTime && abs(time - keyTime)
- > static_cast<signed>(mRepeatTime))
+ > CAST_S32(mRepeatTime))
{
keyTime = time;
inputManager.triggerAction(getActionVectorByKey(key));