summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-30 19:53:43 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-30 19:53:43 +0300
commitbbc9697a153b30503d9d12c120505ec81adeacf1 (patch)
tree3af1effd146efdcf76719882d20ee50d28c9f2dd /src
parentd42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5 (diff)
downloadManaVerse-bbc9697a153b30503d9d12c120505ec81adeacf1.tar.gz
ManaVerse-bbc9697a153b30503d9d12c120505ec81adeacf1.tar.bz2
ManaVerse-bbc9697a153b30503d9d12c120505ec81adeacf1.tar.xz
ManaVerse-bbc9697a153b30503d9d12c120505ec81adeacf1.zip
Fix code style in input.
Diffstat (limited to 'src')
-rw-r--r--src/input/inputmanager.cpp2
-rw-r--r--src/input/keyboardconfig.cpp2
-rw-r--r--src/input/multitouchmanager.cpp4
-rw-r--r--src/input/multitouchmanager.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index d611e4790..c30d97394 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -122,7 +122,7 @@ void InputManager::retrieve()
mNameMap[cf] = i;
KeyFunction &kf = mKey[i];
const std::string keyStr = config.getValue(cf, "");
- const int keyStrSize = keyStr.size();
+ const size_t keyStrSize = keyStr.size();
if (keyStr.empty())
continue;
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp
index 3756e27fb..ee0254b69 100644
--- a/src/input/keyboardconfig.cpp
+++ b/src/input/keyboardconfig.cpp
@@ -68,8 +68,8 @@ int KeyboardConfig::getKeyValueFromEvent(const SDL_Event &event)
return event.key.keysym.sym;
else if (event.key.keysym.scancode > 1)
return -event.key.keysym.scancode;
-#endif
return 0;
+#endif
}
int KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp)
diff --git a/src/input/multitouchmanager.cpp b/src/input/multitouchmanager.cpp
index 446e40aa1..c1626da41 100644
--- a/src/input/multitouchmanager.cpp
+++ b/src/input/multitouchmanager.cpp
@@ -66,8 +66,8 @@ void MultiTouchManager::handleFingerUp(const SDL_Event &event)
updateFinger(event, false);
}
-void MultiTouchManager::checkDevice(const int touchId,
- const int fingerId)
+void MultiTouchManager::checkDevice(const long touchId,
+ const long fingerId)
{
if (fingerId != 1 || !guiInput)
return;
diff --git a/src/input/multitouchmanager.h b/src/input/multitouchmanager.h
index 82bfd0881..707f93e82 100644
--- a/src/input/multitouchmanager.h
+++ b/src/input/multitouchmanager.h
@@ -57,8 +57,8 @@ class MultiTouchManager final
void handleFingerUp(const SDL_Event &event);
- void checkDevice(const int touchId,
- const int fingerId);
+ void checkDevice(const long touchId,
+ const long fingerId);
#endif
private: