diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-11-28 21:51:37 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-11-29 22:47:30 -0800 |
commit | 4096544188501c8e6e9220847fff910eb153d42b (patch) | |
tree | bac711e4d1f4ee1499206505aa908f56af72433b /platform/darwin/src/MGLMultiPoint.mm | |
parent | 336d48df4852021f4b51a15220d8ab976a79a59e (diff) | |
download | qtlocation-mapboxgl-4096544188501c8e6e9220847fff910eb153d42b.tar.gz |
[ios, macos] Marked C array parameters as const
Fixes #7214.
Diffstat (limited to 'platform/darwin/src/MGLMultiPoint.mm')
-rw-r--r-- | platform/darwin/src/MGLMultiPoint.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLMultiPoint.mm b/platform/darwin/src/MGLMultiPoint.mm index 0133e03b32..57b57889f3 100644 --- a/platform/darwin/src/MGLMultiPoint.mm +++ b/platform/darwin/src/MGLMultiPoint.mm @@ -18,7 +18,7 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor) std::vector<CLLocationCoordinate2D> _coordinates; } -- (instancetype)initWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count +- (instancetype)initWithCoordinates:(const CLLocationCoordinate2D *)coords count:(NSUInteger)count { self = [super init]; @@ -65,7 +65,7 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor) std::copy(_coordinates.begin() + range.location, _coordinates.begin() + NSMaxRange(range), coords); } -- (void)appendCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count +- (void)appendCoordinates:(const CLLocationCoordinate2D *)coords count:(NSUInteger)count { [self willChangeValueForKey:@"coordinates"]; _coordinates.insert(_coordinates.end(), count, *coords); @@ -73,7 +73,7 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor) [self didChangeValueForKey:@"coordinates"]; } -- (void)replaceCoordinatesInRange:(NSRange)range withCoordinates:(CLLocationCoordinate2D *)coords +- (void)replaceCoordinatesInRange:(NSRange)range withCoordinates:(const CLLocationCoordinate2D *)coords { if (range.length == 0) { |