From 844a4c81ff39a30396b470f0a6ba3834b1810781 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Fri, 2 May 2014 17:53:33 +0100 Subject: [PATCH] Change InputMessage.motion.pointerSize to a uint32_t. This ensures it's the same size in both 32 and 64 bit processes and also brings it in line with struct MotionEntry. (cherry-picked from commit bc6001b026069714177526eb1120b0011d6f2a51) Change-Id: Ide6bb4dc05cc92a7ae8833e615e8ebb2353255a6 --- services/input/InputDispatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 06a57d5952d02..0da8489897bee 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -1968,7 +1968,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, xOffset = dispatchEntry->xOffset * scaleFactor; yOffset = dispatchEntry->yOffset * scaleFactor; if (scaleFactor != 1.0f) { - for (size_t i = 0; i < motionEntry->pointerCount; i++) { + for (uint32_t i = 0; i < motionEntry->pointerCount; i++) { scaledCoords[i] = motionEntry->pointerCoords[i]; scaledCoords[i].scale(scaleFactor); } @@ -1981,7 +1981,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, // We don't want the dispatch target to know. if (dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS) { - for (size_t i = 0; i < motionEntry->pointerCount; i++) { + for (uint32_t i = 0; i < motionEntry->pointerCount; i++) { scaledCoords[i].clear(); } usingCoords = scaledCoords;