From 31354186a6326a44442c7e064e376bd7c8bf44ca Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Tue, 17 Nov 2015 15:51:27 -0800 Subject: [PATCH] more clearly indicate Foundation imports to avoid recursion --- include/mbgl/ios/MGLAccountManager.h | 2 ++ include/mbgl/ios/MGLAnnotation.h | 1 + include/mbgl/ios/MGLGeometry.h | 7 +++---- include/mbgl/ios/MGLMapCamera.h | 6 ++++-- include/mbgl/ios/MGLMapView+IBAdditions.h | 5 ++++- include/mbgl/ios/MGLMapView.h | 3 ++- include/mbgl/ios/MGLMultiPoint.h | 2 ++ include/mbgl/ios/MGLOverlay.h | 2 ++ include/mbgl/ios/MGLPointAnnotation.h | 2 ++ include/mbgl/ios/MGLPolygon.h | 2 ++ include/mbgl/ios/MGLPolyline.h | 2 ++ include/mbgl/ios/MGLShape.h | 2 ++ include/mbgl/ios/MGLStyle.h | 4 +++- include/mbgl/ios/MGLUserLocation.h | 5 +++++ platform/ios/MGLMapboxEvents.h | 2 ++ platform/ios/MGLMultiPoint_Private.h | 2 ++ platform/ios/MGLUserLocation_Private.h | 4 +++- platform/ios/NSBundle+MGLAdditions.h | 2 ++ platform/ios/NSString+MGLAdditions.h | 2 ++ 19 files changed, 47 insertions(+), 10 deletions(-) diff --git a/include/mbgl/ios/MGLAccountManager.h b/include/mbgl/ios/MGLAccountManager.h index 9d6ba3d06..4c239d6a1 100644 --- a/include/mbgl/ios/MGLAccountManager.h +++ b/include/mbgl/ios/MGLAccountManager.h @@ -1,3 +1,5 @@ +#import + #import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN diff --git a/include/mbgl/ios/MGLAnnotation.h b/include/mbgl/ios/MGLAnnotation.h index 18388d848..aef21ecbc 100644 --- a/include/mbgl/ios/MGLAnnotation.h +++ b/include/mbgl/ios/MGLAnnotation.h @@ -1,3 +1,4 @@ +#import #import #import "MGLTypes.h" diff --git a/include/mbgl/ios/MGLGeometry.h b/include/mbgl/ios/MGLGeometry.h index 05bec9fc0..a2ae9c991 100644 --- a/include/mbgl/ios/MGLGeometry.h +++ b/include/mbgl/ios/MGLGeometry.h @@ -1,10 +1,9 @@ -#pragma once - -#import "MGLTypes.h" - +#import #import #import +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** Defines the area spanned by an MGLCoordinateBounds. */ diff --git a/include/mbgl/ios/MGLMapCamera.h b/include/mbgl/ios/MGLMapCamera.h index 68f3923fd..7c00ad866 100644 --- a/include/mbgl/ios/MGLMapCamera.h +++ b/include/mbgl/ios/MGLMapCamera.h @@ -1,6 +1,8 @@ -#import "Mapbox.h" +#import +#import +#import -#pragma once +#import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN diff --git a/include/mbgl/ios/MGLMapView+IBAdditions.h b/include/mbgl/ios/MGLMapView+IBAdditions.h index e7a602eac..52d5d433b 100644 --- a/include/mbgl/ios/MGLMapView+IBAdditions.h +++ b/include/mbgl/ios/MGLMapView+IBAdditions.h @@ -1,6 +1,9 @@ -#import "MGLMapView.h" +#import + #import "MGLTypes.h" +@class MGLMapView; + NS_ASSUME_NONNULL_BEGIN @interface MGLMapView (IBAdditions) diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 1ff6c9eb6..c715725bd 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -4,10 +4,11 @@ #import #import +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN @class MGLAnnotationImage; -@class MGLMapCamera; @class MGLUserLocation; @class MGLPolyline; @class MGLPolygon; diff --git a/include/mbgl/ios/MGLMultiPoint.h b/include/mbgl/ios/MGLMultiPoint.h index 1fc7ef6dc..5c58016df 100644 --- a/include/mbgl/ios/MGLMultiPoint.h +++ b/include/mbgl/ios/MGLMultiPoint.h @@ -3,6 +3,8 @@ #import "MGLShape.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLMultiPoint` class is an abstract superclass used to define shapes composed of multiple points. You should not create instances of this class directly. Instead, you should create instances of the `MGLPolyline` or `MGLPolygon` classes. However, you can use the method and properties of this class to access information about the specific points associated with the line or polygon. */ diff --git a/include/mbgl/ios/MGLOverlay.h b/include/mbgl/ios/MGLOverlay.h index eee362d57..ab827c0d2 100644 --- a/include/mbgl/ios/MGLOverlay.h +++ b/include/mbgl/ios/MGLOverlay.h @@ -4,6 +4,8 @@ #import "MGLAnnotation.h" #import "MGLGeometry.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLOverlay` protocol defines a specific type of annotation that represents both a point and an area on a map. Overlay objects are essentially data objects that contain the geographic data needed to represent the map area. For example, overlays can take the form of common shapes such as rectangles and circles. They can also describe polygons and other complex shapes. diff --git a/include/mbgl/ios/MGLPointAnnotation.h b/include/mbgl/ios/MGLPointAnnotation.h index ed5000275..d186cbff1 100644 --- a/include/mbgl/ios/MGLPointAnnotation.h +++ b/include/mbgl/ios/MGLPointAnnotation.h @@ -3,6 +3,8 @@ #import "MGLShape.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLPointAnnotation` class defines a concrete annotation object located at a specified point. You can use this class, rather than define your own, in situations where all you want to do is associate a point on the map with a title. */ diff --git a/include/mbgl/ios/MGLPolygon.h b/include/mbgl/ios/MGLPolygon.h index c2fef6de6..a19b984f1 100644 --- a/include/mbgl/ios/MGLPolygon.h +++ b/include/mbgl/ios/MGLPolygon.h @@ -4,6 +4,8 @@ #import "MGLMultiPoint.h" #import "MGLOverlay.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLPolygon` class represents a shape consisting of one or more points that define a closed polygon. The points are connected end-to-end in the order they are provided. The first and last points are connected to each other to create the closed shape. */ diff --git a/include/mbgl/ios/MGLPolyline.h b/include/mbgl/ios/MGLPolyline.h index 07c5286c8..c849bc987 100644 --- a/include/mbgl/ios/MGLPolyline.h +++ b/include/mbgl/ios/MGLPolyline.h @@ -4,6 +4,8 @@ #import "MGLMultiPoint.h" #import "MGLOverlay.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLPolyline` class represents a shape consisting of one or more points that define connecting line segments. The points are connected end-to-end in the order they are provided. The first and last points are not connected to each other. */ diff --git a/include/mbgl/ios/MGLShape.h b/include/mbgl/ios/MGLShape.h index afc2dbb5a..f54d4bfb7 100644 --- a/include/mbgl/ios/MGLShape.h +++ b/include/mbgl/ios/MGLShape.h @@ -2,6 +2,8 @@ #import "MGLAnnotation.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The `MGLShape` class is an abstract class that defines the basic properties for all shape-based annotation objects. This class must be subclassed and cannot be used as is. Subclasses are responsible for defining the geometry of the shape and providing an appropriate value for the coordinate property inherited from the `MGLAnnotation` protocol. */ diff --git a/include/mbgl/ios/MGLStyle.h b/include/mbgl/ios/MGLStyle.h index e27b8b32c..88cb8aaa8 100644 --- a/include/mbgl/ios/MGLStyle.h +++ b/include/mbgl/ios/MGLStyle.h @@ -1,4 +1,6 @@ -#import "Mapbox.h" +#import + +#import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN diff --git a/include/mbgl/ios/MGLUserLocation.h b/include/mbgl/ios/MGLUserLocation.h index 2eea51590..a681ac593 100644 --- a/include/mbgl/ios/MGLUserLocation.h +++ b/include/mbgl/ios/MGLUserLocation.h @@ -1,5 +1,10 @@ +#import +#import + #import "MGLAnnotation.h" +#import "MGLTypes.h" + NS_ASSUME_NONNULL_BEGIN /** The MGLUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing MGLUserLocation object from the userLocation property of the map view displayed in your application. */ diff --git a/platform/ios/MGLMapboxEvents.h b/platform/ios/MGLMapboxEvents.h index 45f809495..920a2227f 100644 --- a/platform/ios/MGLMapboxEvents.h +++ b/platform/ios/MGLMapboxEvents.h @@ -1,3 +1,5 @@ +#import + #import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN diff --git a/platform/ios/MGLMultiPoint_Private.h b/platform/ios/MGLMultiPoint_Private.h index a1a70a677..fe57064a9 100644 --- a/platform/ios/MGLMultiPoint_Private.h +++ b/platform/ios/MGLMultiPoint_Private.h @@ -1,5 +1,7 @@ #import "MGLMultiPoint.h" +#import + @interface MGLMultiPoint (Private) - (instancetype)initWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; diff --git a/platform/ios/MGLUserLocation_Private.h b/platform/ios/MGLUserLocation_Private.h index 892ddfa47..48f6d40e8 100644 --- a/platform/ios/MGLUserLocation_Private.h +++ b/platform/ios/MGLUserLocation_Private.h @@ -1,9 +1,11 @@ #import "MGLUserLocation.h" -NS_ASSUME_NONNULL_BEGIN +#import @class MGLMapView; +NS_ASSUME_NONNULL_BEGIN + @interface MGLUserLocation (Private) @property (nonatomic, weak) MGLMapView *mapView; diff --git a/platform/ios/NSBundle+MGLAdditions.h b/platform/ios/NSBundle+MGLAdditions.h index f3800dfd9..a86e85f79 100644 --- a/platform/ios/NSBundle+MGLAdditions.h +++ b/platform/ios/NSBundle+MGLAdditions.h @@ -1,3 +1,5 @@ +#import + #import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN diff --git a/platform/ios/NSString+MGLAdditions.h b/platform/ios/NSString+MGLAdditions.h index a4941ac85..6064f8b40 100644 --- a/platform/ios/NSString+MGLAdditions.h +++ b/platform/ios/NSString+MGLAdditions.h @@ -1,3 +1,5 @@ +#import + #import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN