From 963f4ae69ecf40541b2a404bded7ed7bf1d56357 Mon Sep 17 00:00:00 2001 From: Michal Zelinka Date: Sun, 29 Aug 2021 00:41:58 +0200 Subject: [PATCH] Compilation fixes --- .../ios/platform/darwin/src/MGLReachability.m | 2 +- .../darwin/src/NSExpression+MGLAdditions.mm | 2 +- platform/ios/platform/ios/src/MGLMapView.mm | 16 +--------------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/platform/ios/platform/darwin/src/MGLReachability.m b/platform/ios/platform/darwin/src/MGLReachability.m index a3c8a57aae8..a6fb265fa08 100644 --- a/platform/ios/platform/darwin/src/MGLReachability.m +++ b/platform/ios/platform/darwin/src/MGLReachability.m @@ -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; } diff --git a/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm index 92071855856..e56d114896b 100644 --- a/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -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:"] || diff --git a/platform/ios/platform/ios/src/MGLMapView.mm b/platform/ios/platform/ios/src/MGLMapView.mm index b00c41a9963..2a5711a1d64 100644 --- a/platform/ios/platform/ios/src/MGLMapView.mm +++ b/platform/ios/platform/ios/src/MGLMapView.mm @@ -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