summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-08 14:59:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-08 14:59:58 +0300
commit9e7eb26ada6a70d52e80a6392278e2ece0548f33 (patch)
treeafc92b2a28ad43dba34f2e89d8ae9140037dcc7f /src/input
parentc23b91cd462346fe395143baec7b0e7edd253b4a (diff)
downloadplus-9e7eb26ada6a70d52e80a6392278e2ece0548f33.tar.gz
plus-9e7eb26ada6a70d52e80a6392278e2ece0548f33.tar.bz2
plus-9e7eb26ada6a70d52e80a6392278e2ece0548f33.tar.xz
plus-9e7eb26ada6a70d52e80a6392278e2ece0548f33.zip
fix code style.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/joystick.cpp2
-rw-r--r--src/input/keyboardconfig.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index 3e52d6ffe..7343ec00c 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -345,7 +345,6 @@ void Joystick::handleRepeat(const int time)
{
bool repeat(false);
const int key = (*it).first;
- int &keyTime = (*it).second;
if (key >= 0 && key < mButtonsNumber)
{
if (mActiveButtons[key])
@@ -353,6 +352,7 @@ void Joystick::handleRepeat(const int time)
}
if (repeat)
{
+ int &keyTime = (*it).second;
if (time > keyTime && abs(time - keyTime)
> SDL_DEFAULT_REPEAT_DELAY * 10)
{
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp
index a5e3674ed..6cf524842 100644
--- a/src/input/keyboardconfig.cpp
+++ b/src/input/keyboardconfig.cpp
@@ -251,7 +251,6 @@ void KeyboardConfig::handleRepeat(const int time)
{
bool repeat(false);
const int key = (*it).first;
- int &keyTime = (*it).second;
if (key >= 0)
{
if (mActiveKeys && mActiveKeys[key])
@@ -264,6 +263,7 @@ void KeyboardConfig::handleRepeat(const int time)
}
if (repeat)
{
+ int &keyTime = (*it).second;
if (time > keyTime && abs(time - keyTime)
> static_cast<signed>(mRepeatTime))
{