summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEimantas Vaiciunas <eimantas@walkingsmarts.com>2017-05-12 08:30:13 +0300
committerMinh Nguyễn <mxn@1ec5.org>2017-05-20 19:55:04 -0700
commitbc3369f61f11e41e7150b2af0e7c6f592d3a107c (patch)
tree2034a8429dbdafaa7bf2d2ffc6714e631919b0be
parentb0b21a25ffbba15c0c43df9513d008f04eb38bfc (diff)
downloadqtlocation-mapboxgl-bc3369f61f11e41e7150b2af0e7c6f592d3a107c.tar.gz
Make `overlays` property `nonnull` on macOS
-rw-r--r--platform/macos/CHANGELOG.md1
-rw-r--r--platform/macos/src/MGLMapView.h4
-rw-r--r--platform/macos/src/MGLMapView.mm4
3 files changed, 5 insertions, 4 deletions
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 377c321452..f28e5c0402 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -25,6 +25,7 @@
* Fixed a crash or console spew when MGLMapView is initialized with a frame smaller than 64 points wide by 64 points tall. ([#8562](https://github.com/mapbox/mapbox-gl-native/pull/8562))
* The error passed into `-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]` now includes a more specific description and failure reason. ([#8418](https://github.com/mapbox/mapbox-gl-native/pull/8418))
* Fixed an issue rendering polylines that contain duplicate vertices. ([#8808](https://github.com/mapbox/mapbox-gl-native/pull/8808))
+* Added non-null `overlays` property to `MGLMapView`. ([#8617](https://github.com/mapbox/mapbox-gl-native/pull/8617))
## 0.4.1 - April 8, 2017
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h
index 2652e0b97d..6bfdcfd100 100644
--- a/platform/macos/src/MGLMapView.h
+++ b/platform/macos/src/MGLMapView.h
@@ -734,9 +734,9 @@ MGL_EXPORT IB_DESIGNABLE
The objects in this array must adopt the `MGLOverlay` protocol. If no
overlays are associated with the map view, the value of this property is
- `nil`.
+ empty array.
*/
-@property (nonatomic, readonly, nullable) NS_ARRAY_OF(id <MGLOverlay>) *overlays;
+@property (nonatomic, readonly, nonnull) NS_ARRAY_OF(id <MGLOverlay>) *overlays;
/**
Adds a single overlay to the map.
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index fc56b1daf5..ea2c0fd1fe 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -2413,9 +2413,9 @@ public:
#pragma mark Overlays
-- (nullable NS_ARRAY_OF(id <MGLOverlay>) *)overlays
+- (nonnull NS_ARRAY_OF(id <MGLOverlay>) *)overlays
{
- if (self.annotations == nil) { return nil; }
+ if (self.annotations == nil) { return @[]; }
NS_MUTABLE_ARRAY_OF(id <MGLOverlay>) *mutableOverlays = [NSMutableArray new];