diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2018-09-11 18:25:32 -0700 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2018-09-11 18:25:32 -0700 |
commit | 381d8b46997ca8b9000b29dba38e0de206856ccb (patch) | |
tree | cdd47319c1af67be2cecd042bb98d4aca1b76c51 /platform/darwin/src/MGLTypes.h | |
parent | 1efec00dc959ee5606ff4db06f7c4e1cd48a5c39 (diff) | |
download | qtlocation-mapboxgl-upstream/ios8-release-frappe.tar.gz |
[ios, macos] started to restore iOS 8 supportupstream/ios8-release-frappe
Diffstat (limited to 'platform/darwin/src/MGLTypes.h')
-rw-r--r-- | platform/darwin/src/MGLTypes.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h index 1c90d7968b..2eff02fb35 100644 --- a/platform/darwin/src/MGLTypes.h +++ b/platform/darwin/src/MGLTypes.h @@ -112,3 +112,24 @@ NS_INLINE MGLTransition MGLTransitionMake(NSTimeInterval duration, NSTimeInterva } NS_ASSUME_NONNULL_END + +#ifndef NS_ARRAY_OF + +// Foundation collection classes adopted lightweight generics in iOS 9.0 and OS X 10.11 SDKs. +#if __has_feature(objc_generics) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) +/** Inserts a type specifier for a pointer to a lightweight generic with the given collection and object classes. Use a `*` for any non-`id` object classes but no `*` for the collection class. */ +#define NS_ARRAY_OF(ObjectClass...) NSArray <ObjectClass> +#define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray <ObjectClass> +#define NS_SET_OF(ObjectClass...) NSSet <ObjectClass> +#define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet <ObjectClass> +#define NS_DICTIONARY_OF(ObjectClass...) NSDictionary <ObjectClass> +#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary <ObjectClass> +#else +#define NS_ARRAY_OF(ObjectClass...) NSArray +#define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray +#define NS_SET_OF(ObjectClass...) NSSet +#define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet +#define NS_DICTIONARY_OF(ObjectClass...) NSDictionary +#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary +#endif +#endif |