Fixed compiler warnings. "leftFingerDown" doesn't need to be an SDL_FingerID.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 03 Apr 2013 11:34:21 -0400
changeset 7050 aa1f44908402
parent 7049 d4b70d310ade
child 7051 cf773d8091c7
Fixed compiler warnings. "leftFingerDown" doesn't need to be an SDL_FingerID.
src/video/uikit/SDL_uikitview.h
src/video/uikit/SDL_uikitview.m
--- a/src/video/uikit/SDL_uikitview.h	Wed Apr 03 10:36:15 2013 -0400
+++ b/src/video/uikit/SDL_uikitview.h	Wed Apr 03 11:34:21 2013 -0400
@@ -37,7 +37,7 @@
 #endif
 
     SDL_TouchID touchId;
-    SDL_FingerID leftFingerDown;
+    UITouch *leftFingerDown;
 #ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
     UITouch *finger[MAX_SIMULTANEOUS_TOUCHES];
 #endif
--- a/src/video/uikit/SDL_uikitview.m	Wed Apr 03 10:36:15 2013 -0400
+++ b/src/video/uikit/SDL_uikitview.m	Wed Apr 03 11:34:21 2013 -0400
@@ -94,7 +94,7 @@
             /* send mouse down event */
             SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
 
-            leftFingerDown = (SDL_FingerID)touch;
+            leftFingerDown = touch;
         }
 
         CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
@@ -102,7 +102,7 @@
         // FIXME: TODO: Using touch as the fingerId is potentially dangerous
         // It is also much more efficient than storing the UITouch pointer
         // and comparing it to the incoming event.
-        SDL_SendTouch(touchId, (SDL_FingerID)touch,
+        SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
                       SDL_TRUE, locationInView.x, locationInView.y, 1.0f);
 #else
         int i;
@@ -125,10 +125,10 @@
     UITouch *touch = (UITouch*)[enumerator nextObject];
 
     while(touch) {
-        if ((SDL_FingerID)touch == leftFingerDown) {
+        if (touch == leftFingerDown) {
             /* send mouse up */
             SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
-            leftFingerDown = 0;
+            leftFingerDown = nil;
         }
 
         CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
@@ -166,7 +166,7 @@
     UITouch *touch = (UITouch*)[enumerator nextObject];
 
     while (touch) {
-        if ((SDL_FingerID)touch == leftFingerDown) {
+        if (touch == leftFingerDown) {
             CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
 
             /* send moved event */