got rid of dumb compiler warnings

This commit is contained in:
Diego Waxemberg
2015-06-01 00:36:21 -07:00
parent 20f82ff739
commit ab019eef0f
@@ -554,8 +554,8 @@ static CGFloat scaledValue( CGFloat v1, CGFloat min2, CGFloat max2, CGFloat min1
UITouch *touch = [touches anyObject]; UITouch *touch = [touches anyObject];
CGPoint nowPoint = [touch locationInView:self.view]; CGPoint nowPoint = [touch locationInView:self.view];
if (abs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES; if (fabs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES;
else if (abs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed; else if (fabs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed;
} }
@end @end
@@ -1274,7 +1274,7 @@ const int FrontViewPositionNone = 0xff;
NSTimeInterval duration = _toggleAnimationDuration; NSTimeInterval duration = _toggleAnimationDuration;
// Velocity driven change: // Velocity driven change:
if (fabsf(velocity) > _quickFlickVelocity) if (fabs(velocity) > _quickFlickVelocity)
{ {
// we may need to set the drag position and to adjust the animation duration // we may need to set the drag position and to adjust the animation duration
CGFloat journey = xLocation; CGFloat journey = xLocation;
@@ -1292,7 +1292,7 @@ const int FrontViewPositionNone = 0xff;
} }
} }
duration = fabsf(journey/velocity); duration = fabs(journey/velocity);
} }
// Position driven change: // Position driven change:
@@ -1349,7 +1349,7 @@ const int FrontViewPositionNone = 0xff;
NSTimeInterval duration = animated?_toggleAnimationDuration:0.0; NSTimeInterval duration = animated?_toggleAnimationDuration:0.0;
NSTimeInterval firstDuration = duration; NSTimeInterval firstDuration = duration;
int initialPosDif = abs( _frontViewPosition - preReplacementPosition ); int initialPosDif = (int) labs( _frontViewPosition - preReplacementPosition );
if ( initialPosDif == 1 ) firstDuration *= 0.8; if ( initialPosDif == 1 ) firstDuration *= 0.8;
else if ( initialPosDif == 0 ) firstDuration = 0; else if ( initialPosDif == 0 ) firstDuration = 0;