summaryrefslogtreecommitdiff
path: root/src/eventsmanager.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/eventsmanager.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r--src/eventsmanager.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index 8f3e7bdd4..a8d3ea582 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -220,8 +220,8 @@ void EventsManager::logEvent(const SDL_Event &event)
case SDL_MOUSEMOTION:
logger->log("event: SDL_MOUSEMOTION: %u,%d,%d",
event.motion.state,
- static_cast<int>(event.motion.x),
- static_cast<int>(event.motion.y));
+ CAST_S32(event.motion.x),
+ CAST_S32(event.motion.y));
break;
case SDL_FINGERDOWN:
{
@@ -229,8 +229,8 @@ void EventsManager::logEvent(const SDL_Event &event)
const int w = mainGraphics->mWidth;
const int h = mainGraphics->mHeight;
logger->log("event: SDL_FINGERDOWN: %u,%u (%f,%f) (%f,%f)",
- static_cast<unsigned int>(touch.touchId),
- static_cast<unsigned int>(touch.fingerId),
+ CAST_U32(touch.touchId),
+ CAST_U32(touch.fingerId),
touch.x * w, touch.y * w,
touch.dx * w, touch.dy * h);
break;
@@ -241,8 +241,8 @@ void EventsManager::logEvent(const SDL_Event &event)
const int w = mainGraphics->mWidth;
const int h = mainGraphics->mHeight;
logger->log("event: SDL_FINGERUP: %u,%u (%f,%f) (%f,%f)",
- static_cast<unsigned int>(touch.touchId),
- static_cast<unsigned int>(touch.fingerId),
+ CAST_U32(touch.touchId),
+ CAST_U32(touch.fingerId),
touch.x * w, touch.y * w,
touch.dx * w, touch.dy * h);
break;
@@ -253,8 +253,8 @@ void EventsManager::logEvent(const SDL_Event &event)
const int w = mainGraphics->mWidth;
const int h = mainGraphics->mHeight;
logger->log("event: SDL_FINGERMOTION: %u,%u (%f,%f) (%f,%f)",
- static_cast<unsigned int>(touch.touchId),
- static_cast<unsigned int>(touch.fingerId),
+ CAST_U32(touch.touchId),
+ CAST_U32(touch.fingerId),
touch.x * w, touch.y * h,
touch.dx * w, touch.dy * h);
break;
@@ -265,11 +265,11 @@ void EventsManager::logEvent(const SDL_Event &event)
const int w = mainGraphics->mWidth;
const int h = mainGraphics->mHeight;
logger->log("event: SDL_MULTIGESTURE: %u %f,%f (%f,%f) %d,%d",
- static_cast<unsigned int>(gesture.touchId),
+ CAST_U32(gesture.touchId),
gesture.dTheta, gesture.dDist,
gesture.x * w, gesture.y * h,
- static_cast<int>(gesture.numFingers),
- static_cast<int>(gesture.padding));
+ CAST_S32(gesture.numFingers),
+ CAST_S32(gesture.padding));
break;
}
case SDL_KEYDOWN: