summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-11-23 12:21:52 -0800
committerGitHub <noreply@github.com>2016-11-23 12:21:52 -0800
commit67e079f7268015f75b47090a6a0db5c3176d40d6 (patch)
tree6e2c56b6398b405e702692a3c143cbaf8baaa0b6
parent75666e5b539010e08badf6e79b1269da1361f4b5 (diff)
downloadqtlocation-mapboxgl-67e079f7268015f75b47090a6a0db5c3176d40d6.tar.gz
[ios, macos] Fix integer formatting in formatted exception strings (#7173)
-rw-r--r--platform/darwin/src/MGLMultiPoint.mm8
-rw-r--r--platform/darwin/src/MGLPointCollection.mm4
-rw-r--r--platform/ios/app/MBXViewController.m2
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];
}
}