[ios] Only assert protocol conformance in Debug
Fixed some warnings when building Release.
This commit is contained in:
committed by
Minh Nguyễn
parent
b8c39667ff
commit
7ae6b13003
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user