diff options
author | Julian Rex <julian.rex@mapbox.com> | 2019-05-02 14:08:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 14:08:48 -0400 |
commit | f7915fdc51f4924df2e2630b64908938ffa49830 (patch) | |
tree | 2364053e375a5091392096d3dd9e25086b66e847 /platform/ios/src | |
parent | c611d085b3dd478466f05eab24c442d53fef84ec (diff) | |
download | qtlocation-mapboxgl-f7915fdc51f4924df2e2630b64908938ffa49830.tar.gz |
[ios] Static analysis fix tweaks - part 2 (#14572)
Diffstat (limited to 'platform/ios/src')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 8 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 2423d62ee1..607a197840 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -1130,7 +1130,7 @@ MGL_EXPORT `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ -- (nullable MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; +- (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; /** Returns the camera that best fits the given coordinate bounds, with the specified camera, @@ -1150,7 +1150,7 @@ MGL_EXPORT `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ -- (nullable MGLMapCamera *)camera:(MGLMapCamera *)camera fittingCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; +- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; /** Returns the camera that best fits the given shape, with the specified camera, @@ -1169,7 +1169,7 @@ MGL_EXPORT `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ -- (nullable MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets; +- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets; /** Returns the camera that best fits the given shape, with the specified direction, @@ -1187,7 +1187,7 @@ MGL_EXPORT `UIApplicationWillTerminateNotification`; you may receive a `nil` return value depending on the order of notification delivery. */ -- (nullable MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets; +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets; /** Returns the point in this view’s coordinate system on which to "anchor" in diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index b5383ee30e..7cebd57710 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2481,7 +2481,7 @@ public: }]; [attributionController addAction:telemetryAction]; - NSString *cancelTitle = NSLocalizedStringWithDefaultValue(@"CANCEL", nil, nil, @"Cancel", @"Cancel"); + NSString *cancelTitle = NSLocalizedStringWithDefaultValue(@"CANCEL", nil, nil, @"Cancel", @"Title of button for dismissing attribution action sheet"); UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleCancel handler:NULL]; @@ -3873,9 +3873,9 @@ public: { if (!_mbglMap) { - return nil; + return self.residualCamera; } - + mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); padding += MGLEdgeInsetsFromNSEdgeInsets(self.contentInset); mbgl::CameraOptions cameraOptions = self.mbglMap.cameraForLatLngBounds(MGLLatLngBoundsFromCoordinateBounds(bounds), padding); @@ -3886,7 +3886,7 @@ public: { if (!_mbglMap) { - return nil; + return self.residualCamera; } mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); @@ -3903,7 +3903,7 @@ public: - (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets { if (!_mbglMap) { - return nil; + return self.residualCamera; } mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); @@ -3921,7 +3921,7 @@ public: - (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets { if (!_mbglMap) { - return nil; + return self.residualCamera; } mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); @@ -3936,7 +3936,7 @@ public: { if (!_mbglMap) { - return nil; + return self.residualCamera; } mbgl::CameraOptions mapCamera = self.mbglMap.getCameraOptions(); |