mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
got rid of dumb compiler warnings
This commit is contained in:
@@ -554,8 +554,8 @@ static CGFloat scaledValue( CGFloat v1, CGFloat min2, CGFloat max2, CGFloat min1
|
||||
UITouch *touch = [touches anyObject];
|
||||
CGPoint nowPoint = [touch locationInView:self.view];
|
||||
|
||||
if (abs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES;
|
||||
else if (abs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed;
|
||||
if (fabs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES;
|
||||
else if (fabs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1274,7 +1274,7 @@ const int FrontViewPositionNone = 0xff;
|
||||
NSTimeInterval duration = _toggleAnimationDuration;
|
||||
|
||||
// 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
|
||||
CGFloat journey = xLocation;
|
||||
@@ -1292,7 +1292,7 @@ const int FrontViewPositionNone = 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
duration = fabsf(journey/velocity);
|
||||
duration = fabs(journey/velocity);
|
||||
}
|
||||
|
||||
// Position driven change:
|
||||
@@ -1349,7 +1349,7 @@ const int FrontViewPositionNone = 0xff;
|
||||
|
||||
NSTimeInterval duration = animated?_toggleAnimationDuration:0.0;
|
||||
NSTimeInterval firstDuration = duration;
|
||||
int initialPosDif = abs( _frontViewPosition - preReplacementPosition );
|
||||
int initialPosDif = (int) labs( _frontViewPosition - preReplacementPosition );
|
||||
if ( initialPosDif == 1 ) firstDuration *= 0.8;
|
||||
else if ( initialPosDif == 0 ) firstDuration = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user