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 7050aa1f44908402
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
     1.1 --- a/src/video/uikit/SDL_uikitview.h	Wed Apr 03 10:36:15 2013 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitview.h	Wed Apr 03 11:34:21 2013 -0400
     1.3 @@ -37,7 +37,7 @@
     1.4  #endif
     1.5  
     1.6      SDL_TouchID touchId;
     1.7 -    SDL_FingerID leftFingerDown;
     1.8 +    UITouch *leftFingerDown;
     1.9  #ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    1.10      UITouch *finger[MAX_SIMULTANEOUS_TOUCHES];
    1.11  #endif
     2.1 --- a/src/video/uikit/SDL_uikitview.m	Wed Apr 03 10:36:15 2013 -0400
     2.2 +++ b/src/video/uikit/SDL_uikitview.m	Wed Apr 03 11:34:21 2013 -0400
     2.3 @@ -94,7 +94,7 @@
     2.4              /* send mouse down event */
     2.5              SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
     2.6  
     2.7 -            leftFingerDown = (SDL_FingerID)touch;
     2.8 +            leftFingerDown = touch;
     2.9          }
    2.10  
    2.11          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    2.12 @@ -102,7 +102,7 @@
    2.13          // FIXME: TODO: Using touch as the fingerId is potentially dangerous
    2.14          // It is also much more efficient than storing the UITouch pointer
    2.15          // and comparing it to the incoming event.
    2.16 -        SDL_SendTouch(touchId, (SDL_FingerID)touch,
    2.17 +        SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
    2.18                        SDL_TRUE, locationInView.x, locationInView.y, 1.0f);
    2.19  #else
    2.20          int i;
    2.21 @@ -125,10 +125,10 @@
    2.22      UITouch *touch = (UITouch*)[enumerator nextObject];
    2.23  
    2.24      while(touch) {
    2.25 -        if ((SDL_FingerID)touch == leftFingerDown) {
    2.26 +        if (touch == leftFingerDown) {
    2.27              /* send mouse up */
    2.28              SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    2.29 -            leftFingerDown = 0;
    2.30 +            leftFingerDown = nil;
    2.31          }
    2.32  
    2.33          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    2.34 @@ -166,7 +166,7 @@
    2.35      UITouch *touch = (UITouch*)[enumerator nextObject];
    2.36  
    2.37      while (touch) {
    2.38 -        if ((SDL_FingerID)touch == leftFingerDown) {
    2.39 +        if (touch == leftFingerDown) {
    2.40              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
    2.41  
    2.42              /* send moved event */