summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFoundation_Private.h
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@gmail.com>2019-01-14 15:17:13 -0500
committerGitHub <noreply@github.com>2019-01-14 15:17:13 -0500
commitc8c664fbf376b615b3f1e4b2a4d7f1c99b6097be (patch)
tree414451567862d1bca08bcff1798ebb6b6501ad8d /platform/darwin/src/MGLFoundation_Private.h
parent2342b8ee936b9ecce33e152d109a091e505488e6 (diff)
downloadqtlocation-mapboxgl-c8c664fbf376b615b3f1e4b2a4d7f1c99b6097be.tar.gz
[ios, macos] Support getLeaves (and related) clustering methods (#12952) following feature extension API (#13382)
Diffstat (limited to 'platform/darwin/src/MGLFoundation_Private.h')
-rw-r--r--platform/darwin/src/MGLFoundation_Private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLFoundation_Private.h b/platform/darwin/src/MGLFoundation_Private.h
index 71737c2cf9..db81bde3de 100644
--- a/platform/darwin/src/MGLFoundation_Private.h
+++ b/platform/darwin/src/MGLFoundation_Private.h
@@ -11,3 +11,9 @@ void MGLInitializeRunLoop();
(type *)([temp##__LINE__ isKindOfClass:[type class]] ? temp##__LINE__ : nil); \
})
+#define MGL_OBJC_DYNAMIC_CAST_AS_PROTOCOL(object, proto) \
+ ({ \
+ __typeof__( object ) temp##__LINE__ = (object); \
+ (id< proto >)([temp##__LINE__ conformsToProtocol:@protocol( proto )] ? temp##__LINE__ : nil); \
+ })
+