diff options
author | Jason Wray <jason@mapbox.com> | 2018-10-03 19:50:49 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-10-03 19:50:49 -0400 |
commit | dc8b2cc7ac7451739e3b2c2e32f02c366bab4506 (patch) | |
tree | 7dac951a07aa9b23dbf0063094cf3f5a51fb5219 | |
parent | 9cf023b90f02eb5badc57564ae18ace5100b989d (diff) | |
download | qtlocation-mapboxgl-upstream/fb-ignore-self-inflicted-deprecation-warnings.tar.gz |
[ios] Ignore deprecation warnings for MGLMapView.userLocationVerticalAlignmentupstream/fb-ignore-self-inflicted-deprecation-warnings
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 8fdd393e48..e9fd568a04 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -5254,10 +5254,15 @@ public: self.targetCoordinate, }; UIEdgeInsets inset = self.edgePaddingForFollowingWithCourse; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (self.userLocationVerticalAlignment == MGLAnnotationVerticalAlignmentCenter) { inset.bottom = CGRectGetMaxY(self.bounds) - CGRectGetMidY(self.contentFrame); } +#pragma clang diagnostic pop + [self _setVisibleCoordinates:foci count:sizeof(foci) / sizeof(foci[0]) edgePadding:inset @@ -5317,10 +5322,13 @@ public: if (direction >= 0) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (self.userLocationVerticalAlignment == MGLAnnotationVerticalAlignmentTop) { direction += 180; } +#pragma clang diagnostic pop } } return direction; @@ -6012,7 +6020,9 @@ public: } CGPoint center = CGPointMake(CGRectGetMidX(contentFrame), CGRectGetMidY(contentFrame)); - + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" switch (self.userLocationVerticalAlignment) { case MGLAnnotationVerticalAlignmentCenter: break; @@ -6023,6 +6033,7 @@ public: center.y = CGRectGetMaxY(contentFrame); break; } +#pragma clang dianostic pop return center; } |