[ios] Only assert protocol conformance in Debug

Fixed some warnings when building Release.
This commit is contained in:
Minh Nguyễn
2016-04-11 16:39:09 -07:00
committed by Minh Nguyễn
parent b8c39667ff
commit 7ae6b13003

View File

@@ -2568,10 +2568,12 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
- (void)addOverlays:(NS_ARRAY_OF(id <MGLOverlay>) *)overlays
{
#if DEBUG
for (id <MGLOverlay> overlay in overlays)
{
NSAssert([overlay conformsToProtocol:@protocol(MGLOverlay)], @"overlay should conform to MGLOverlay");
}
#endif
[self addAnnotations:overlays];
}
@@ -2583,10 +2585,12 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
- (void)removeOverlays:(NS_ARRAY_OF(id <MGLOverlay>) *)overlays
{
#if DEBUG
for (id <MGLOverlay> overlay in overlays)
{
NSAssert([overlay conformsToProtocol:@protocol(MGLOverlay)], @"overlay should conform to MGLOverlay");
}
#endif
[self removeAnnotations:overlays];
}