[ios, macos] Fix integer formatting in formatted exception strings (#7173)
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user