From 7ae6b13003e769c06c48f7c3e51fa91ea441fc6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Mon, 11 Apr 2016 16:39:09 -0700 Subject: [PATCH] [ios] Only assert protocol conformance in Debug Fixed some warnings when building Release. --- platform/ios/src/MGLMapView.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 24ee30045..195635ef1 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2568,10 +2568,12 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) - (void)addOverlays:(NS_ARRAY_OF(id ) *)overlays { +#if DEBUG for (id 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 ) *)overlays { +#if DEBUG for (id overlay in overlays) { NSAssert([overlay conformsToProtocol:@protocol(MGLOverlay)], @"overlay should conform to MGLOverlay"); } +#endif [self removeAnnotations:overlays]; }