diff options
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/include/MGLTypes.h | 39 | ||||
-rw-r--r-- | platform/darwin/test/MGLGeometryTests.mm | 3 | ||||
-rw-r--r-- | platform/darwin/test/MGLOfflinePackTests.m | 4 | ||||
-rw-r--r-- | platform/darwin/test/MGLOfflineRegionTests.m | 3 | ||||
-rw-r--r-- | platform/darwin/test/MGLOfflineStorageTests.m | 7 | ||||
-rw-r--r-- | platform/darwin/test/MGLStyleTests.mm | 3 |
6 files changed, 20 insertions, 39 deletions
diff --git a/platform/darwin/include/MGLTypes.h b/platform/darwin/include/MGLTypes.h index ccb496816a..9617b069da 100644 --- a/platform/darwin/include/MGLTypes.h +++ b/platform/darwin/include/MGLTypes.h @@ -38,25 +38,22 @@ typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) { NS_ASSUME_NONNULL_END -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wvariadic-macros" - #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 +#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 -#pragma clang diagnostic pop +#endif diff --git a/platform/darwin/test/MGLGeometryTests.mm b/platform/darwin/test/MGLGeometryTests.mm index 709353da2b..73af0bb211 100644 --- a/platform/darwin/test/MGLGeometryTests.mm +++ b/platform/darwin/test/MGLGeometryTests.mm @@ -1,8 +1,5 @@ #import "../../darwin/src/MGLGeometry_Private.h" -#pragma clang diagnostic ignored "-Wgnu-statement-expression" -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" - #import <XCTest/XCTest.h> @interface MGLGeometryTests : XCTestCase diff --git a/platform/darwin/test/MGLOfflinePackTests.m b/platform/darwin/test/MGLOfflinePackTests.m index 41262d16c7..7fb450198e 100644 --- a/platform/darwin/test/MGLOfflinePackTests.m +++ b/platform/darwin/test/MGLOfflinePackTests.m @@ -1,8 +1,4 @@ #import <Mapbox/Mapbox.h> - -#pragma clang diagnostic ignored "-Wgnu-statement-expression" -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" - #import <XCTest/XCTest.h> @interface MGLOfflinePackTests : XCTestCase diff --git a/platform/darwin/test/MGLOfflineRegionTests.m b/platform/darwin/test/MGLOfflineRegionTests.m index 63befdf14c..7164acb39c 100644 --- a/platform/darwin/test/MGLOfflineRegionTests.m +++ b/platform/darwin/test/MGLOfflineRegionTests.m @@ -1,8 +1,5 @@ #import <Mapbox/Mapbox.h> -#pragma clang diagnostic ignored "-Wgnu-statement-expression" -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" - #import <XCTest/XCTest.h> @interface MGLOfflineRegionTests : XCTestCase diff --git a/platform/darwin/test/MGLOfflineStorageTests.m b/platform/darwin/test/MGLOfflineStorageTests.m index 0f928712a8..dc09b592bf 100644 --- a/platform/darwin/test/MGLOfflineStorageTests.m +++ b/platform/darwin/test/MGLOfflineStorageTests.m @@ -1,8 +1,5 @@ #import <Mapbox/Mapbox.h> -#pragma clang diagnostic ignored "-Wgnu-statement-expression" -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" - #import <XCTest/XCTest.h> @interface MGLOfflineStorageTests : XCTestCase @@ -33,8 +30,8 @@ NSURL *styleURL = [MGLStyle lightStyleURL]; /// Somewhere near Grape Grove, Ohio, United States. MGLCoordinateBounds bounds = { - { 39.70358155855172, -83.69506472545841 }, - { 39.703818870225376, -83.69420641857361 }, + { .latitude = 39.70358155855172, .longitude = -83.69506472545841 }, + { .latitude = 39.703818870225376, .longitude = -83.69420641857361 }, }; double zoomLevel = 20; MGLTilePyramidOfflineRegion *region = [[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:styleURL bounds:bounds fromZoomLevel:zoomLevel toZoomLevel:zoomLevel]; diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index 69c9ef6091..0d6b7b5c18 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -2,9 +2,6 @@ #import <mbgl/util/default_styles.hpp> -#pragma clang diagnostic ignored "-Wgnu-statement-expression" -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" - #import <XCTest/XCTest.h> @interface MGLStyleTests : XCTestCase |