Skip to content

Commit

Permalink
Compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
username0x0a committed Oct 2, 2022
1 parent b979fdb commit 99b4d08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion platform/ios/platform/darwin/src/MGLReachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags
- (NSString *) description
{
NSString *description = [NSString stringWithFormat:@"<%@: %p (%@)>",
NSStringFromClass([self class]), (void *) self, [self currentReachabilityFlags]];
NSStringFromClass([self class]), self, [self currentReachabilityFlags]];
return description;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ - (id)mgl_jsonExpressionObject {
}

return self.arguments.mgl_jsonExpressionObject;
} else if (op == (NSString *) [MGLColor class] && [function isEqualToString:@"colorWithRed:green:blue:alpha:"]) {
} else if ([function isEqualToString:@"colorWithRed:green:blue:alpha:"]) {
NSArray *arguments = self.arguments.mgl_jsonExpressionObject;
return [@[@"rgba"] arrayByAddingObjectsFromArray:arguments];
} else if ([function isEqualToString:@"median:"] ||
Expand Down
16 changes: 1 addition & 15 deletions platform/ios/platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1381,21 +1381,7 @@ - (void)updateDisplayLinkPreferredFramesPerSecond
newFrameRate = _preferredFramesPerSecond;
}

if (@available(iOS 10.0, *))
{
_displayLink.preferredFramesPerSecond = newFrameRate;
}
else
{
// CADisplayLink.frameInterval does not support more than 60 FPS (and
// no device that supports >60 FPS ever supported iOS 9).
NSInteger maximumFrameRate = 60;

// `0` is an alias for maximum frame rate.
newFrameRate = newFrameRate ?: maximumFrameRate;

_displayLink.preferredFramesPerSecond = maximumFrameRate / MIN(newFrameRate, maximumFrameRate);
}
_displayLink.preferredFramesPerSecond = newFrameRate;
}

- (void)setPreferredFramesPerSecond:(MGLMapViewPreferredFramesPerSecond)preferredFramesPerSecond
Expand Down

0 comments on commit 99b4d08

Please sign in to comment.