diff options
author | Jesse Bounds <jesse@rebounds.net> | 2016-11-23 12:21:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-23 12:21:52 -0800 |
commit | 67e079f7268015f75b47090a6a0db5c3176d40d6 (patch) | |
tree | 6e2c56b6398b405e702692a3c143cbaf8baaa0b6 | |
parent | 75666e5b539010e08badf6e79b1269da1361f4b5 (diff) | |
download | qtlocation-mapboxgl-67e079f7268015f75b47090a6a0db5c3176d40d6.tar.gz |
[ios, macos] Fix integer formatting in formatted exception strings (#7173)
-rw-r--r-- | platform/darwin/src/MGLMultiPoint.mm | 8 | ||||
-rw-r--r-- | platform/darwin/src/MGLPointCollection.mm | 4 | ||||
-rw-r--r-- | platform/ios/app/MBXViewController.m | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/platform/darwin/src/MGLMultiPoint.mm b/platform/darwin/src/MGLMultiPoint.mm index f086bcbc39..0133e03b32 100644 --- a/platform/darwin/src/MGLMultiPoint.mm +++ b/platform/darwin/src/MGLMultiPoint.mm @@ -58,8 +58,8 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor) if (range.location + range.length > [self pointCount]) { [NSException raise:NSRangeException - format:@"Invalid coordinate range %@ extends beyond current coordinate count of %@", - NSStringFromRange(range), @([self pointCount])]; + format:@"Invalid coordinate range %@ extends beyond current coordinate count of %ld", + NSStringFromRange(range), (unsigned long)[self pointCount]]; } std::copy(_coordinates.begin() + range.location, _coordinates.begin() + NSMaxRange(range), coords); @@ -83,8 +83,8 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor) if (NSMaxRange(range) > _coordinates.size()) { [NSException raise:NSRangeException - format:@"Invalid range %@ for existing coordinate count %@", - NSStringFromRange(range), @([self pointCount])]; + format:@"Invalid range %@ for existing coordinate count %ld", + NSStringFromRange(range), (unsigned long)[self pointCount]]; } [self willChangeValueForKey:@"coordinates"]; diff --git a/platform/darwin/src/MGLPointCollection.mm b/platform/darwin/src/MGLPointCollection.mm index 21982ca7bb..8c9d11f42b 100644 --- a/platform/darwin/src/MGLPointCollection.mm +++ b/platform/darwin/src/MGLPointCollection.mm @@ -54,8 +54,8 @@ NS_ASSUME_NONNULL_BEGIN if (range.location + range.length > [self pointCount]) { [NSException raise:NSRangeException - format:@"Invalid coordinate range %@ extends beyond current coordinate count of %@", - NSStringFromRange(range), @([self pointCount])]; + format:@"Invalid coordinate range %@ extends beyond current coordinate count of %ld", + NSStringFromRange(range), (unsigned long)[self pointCount]]; } std::copy(_coordinates.begin() + range.location, _coordinates.begin() + NSMaxRange(range), coords); diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 91e934ed1f..8a2ccee413 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1596,7 +1596,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { { queuedAnnotations += queue.count; } - self.hudLabel.text = [NSString stringWithFormat:@"Visible: %ld Queued: %ld", (long)mapView.visibleAnnotations.count, (long)queuedAnnotations]; + self.hudLabel.text = [NSString stringWithFormat:@"Visible: %ld Queued: %ld", (unsigned long)mapView.visibleAnnotations.count, (unsigned long)queuedAnnotations]; } } |