Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
formatting & brevity
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Oct 4, 2016
1 parent a2377ed commit d240ba9
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions platform/darwin/src/MGLMultiPoint.mm
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ - (void)getCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range
{
if (range.location + range.length > _count)
{
[[NSException exceptionWithName:NSRangeException
reason:[NSString stringWithFormat:
@"Invalid coordinate range %@ extends beyond current coordinate count of %zu",
NSStringFromRange(range), _count]
userInfo:nil] raise];
[NSException raise:NSRangeException
format:@"Invalid coordinate range %@ extends beyond current coordinate count of %zu",
NSStringFromRange(range), _count];
}

NSUInteger index = 0;
Expand All @@ -88,17 +86,13 @@ - (void)setCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range
{
if (range.length == 0)
{
[[NSException exceptionWithName:NSRangeException
reason:[NSString stringWithFormat:@"Empty coordinate range %@", NSStringFromRange(range)]
userInfo:nil] raise];
[NSException raise:NSRangeException format:@"Empty coordinate range %@", NSStringFromRange(range)];
}
else if (range.location > _count)
{
[[NSException exceptionWithName:NSRangeException
reason:[NSString stringWithFormat:
@"Invalid range %@ for existing coordinate count %zu",
NSStringFromRange(range), _count]
userInfo:nil] raise];
[NSException raise:NSRangeException
format:@"Invalid range %@ for existing coordinate count %zu",
NSStringFromRange(range), _count];
}

[self willChangeValueForKey:@"coordinates"];
Expand Down Expand Up @@ -139,7 +133,7 @@ - (BOOL)intersectsOverlayBounds:(MGLCoordinateBounds)overlayBounds
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; count = %lu; bounds = %@>",
NSStringFromClass([self class]), (void *)self, (unsigned long)_count, MGLStringFromCoordinateBounds(_bounds)];
NSStringFromClass([self class]), (void *)self, (unsigned long)_count, MGLStringFromCoordinateBounds(_bounds)];
}

@end

0 comments on commit d240ba9

Please sign in to comment.