diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-05 12:28:13 +0300 |
---|---|---|
committer | Julian Rex <julian.rex@mapbox.com> | 2019-09-07 00:15:38 -0400 |
commit | dae3ecef86999d9d32c7038e7d674b9063025a16 (patch) | |
tree | 10f6890c081ddac33ebc484ab453a24fdd03b10c | |
parent | 8dd2d25b0dc8e39800d8fb99b6df87912e9ea754 (diff) | |
download | qtlocation-mapboxgl-dae3ecef86999d9d32c7038e7d674b9063025a16.tar.gz |
[darwin] Fix MGLInvalidStyle.. error descriptions. Update properties
-rw-r--r-- | platform/darwin/src/MGLImageSource.mm | 1 | ||||
-rw-r--r-- | platform/darwin/src/MGLShapeSource.mm | 1 | ||||
-rw-r--r-- | platform/darwin/src/MGLSource_Private.h | 2 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyleLayer_Private.h | 4 |
4 files changed, 5 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLImageSource.mm b/platform/darwin/src/MGLImageSource.mm index 50422ccedc..b738a029a7 100644 --- a/platform/darwin/src/MGLImageSource.mm +++ b/platform/darwin/src/MGLImageSource.mm @@ -81,6 +81,7 @@ } - (NSString *)description { + MGLAssertStyleSourceIsValid(); return [NSString stringWithFormat:@"<%@: %p; identifier = %@; coordinates = %@; URL = %@; image = %@>", NSStringFromClass([self class]), (void *)self, self.identifier, MGLStringFromCoordinateQuad(self.coordinates), self.URL, self.image]; } diff --git a/platform/darwin/src/MGLShapeSource.mm b/platform/darwin/src/MGLShapeSource.mm index 19aad56182..eb2a4645f2 100644 --- a/platform/darwin/src/MGLShapeSource.mm +++ b/platform/darwin/src/MGLShapeSource.mm @@ -172,6 +172,7 @@ mbgl::style::GeoJSONOptions MGLGeoJSONOptionsFromDictionary(NSDictionary<MGLShap } - (NSString *)description { + MGLAssertStyleSourceIsValid(); return [NSString stringWithFormat:@"<%@: %p; identifier = %@; URL = %@; shape = %@>", NSStringFromClass([self class]), (void *)self, self.identifier, self.URL, self.shape]; } diff --git a/platform/darwin/src/MGLSource_Private.h b/platform/darwin/src/MGLSource_Private.h index 2d4b2a3c41..3bf0e71e6b 100644 --- a/platform/darwin/src/MGLSource_Private.h +++ b/platform/darwin/src/MGLSource_Private.h @@ -30,7 +30,7 @@ do { \ if (!self.rawSource) { \ [NSException raise:MGLInvalidStyleSourceException \ format: \ -@"-This source got invalidated after the style change "]; \ +@"This source got invalidated after the style change "]; \ } \ } while (NO); diff --git a/platform/darwin/src/MGLStyleLayer_Private.h b/platform/darwin/src/MGLStyleLayer_Private.h index 5c6d12cc89..52254f78c6 100644 --- a/platform/darwin/src/MGLStyleLayer_Private.h +++ b/platform/darwin/src/MGLStyleLayer_Private.h @@ -27,8 +27,8 @@ struct LayerWrapper { if (!self.rawLayer) { \ [NSException raise:MGLInvalidStyleLayerException \ format: \ - @"-Either this layer got invalidated after the style change or " \ - @"[MGLStyle removeLayer:] has been called " \ + @"Either this layer got invalidated after the style change or " \ + @"-[MGLStyle removeLayer:] has been called " \ @"with this instance but another style layer instance was added with the same identifer. It is an " \ @"error to send any message to this layer since it cannot be recovered after removal due to the " \ @"identifier collision. Use unique identifiers for all layer instances including layers of " \ |