update to modern use of `instancetype`
Showing
8 changed files
with
14 additions
and
14 deletions
@@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
122 | * @param aCoordinate The location for the annotation. | 122 | * @param aCoordinate The location for the annotation. |
123 | * @param aTitle The annotation's title. | 123 | * @param aTitle The annotation's title. |
124 | * @return An annotation object, or `nil` if an annotation was unable to be created. */ | 124 | * @return An annotation object, or `nil` if an annotation was unable to be created. */ |
125 | -+ (id)annotationWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitle; | 125 | ++ (instancetype)annotationWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitle; |
126 | 126 | ||
127 | /** Initialize an annotation. | 127 | /** Initialize an annotation. |
128 | * @param aMapView The map view on which to place the annotation. | 128 | * @param aMapView The map view on which to place the annotation. |
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | @synthesize clusteredAnnotations; | 55 | @synthesize clusteredAnnotations; |
56 | @synthesize isUserLocationAnnotation; | 56 | @synthesize isUserLocationAnnotation; |
57 | 57 | ||
58 | -+ (id)annotationWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitle | 58 | ++ (instancetype)annotationWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitle |
59 | { | 59 | { |
60 | return [[self alloc] initWithMapView:aMapView coordinate:aCoordinate andTitle:aTitle]; | 60 | return [[self alloc] initWithMapView:aMapView coordinate:aCoordinate andTitle:aTitle]; |
61 | } | 61 | } |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | * @param aTile The tile key for the object. | 49 | * @param aTile The tile key for the object. |
50 | * @param aCacheKey The unique identifier for the cache. | 50 | * @param aCacheKey The unique identifier for the cache. |
51 | * @return A newly created cache object. */ | 51 | * @return A newly created cache object. */ |
52 | -+ (id)cacheObject:(id)anObject forTile:(RMTile)aTile withCacheKey:(NSString *)aCacheKey; | 52 | ++ (instancetype)cacheObject:(id)anObject forTile:(RMTile)aTile withCacheKey:(NSString *)aCacheKey; |
53 | 53 | ||
54 | /** Initializes and returns a newly allocated cache object for a given key and object to store in a given cache. | 54 | /** Initializes and returns a newly allocated cache object for a given key and object to store in a given cache. |
55 | * @param anObject The object to cache, typically a UIImage. | 55 | * @param anObject The object to cache, typically a UIImage. |
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | @synthesize tile = _tile; | 42 | @synthesize tile = _tile; |
43 | @synthesize timestamp = _timestamp; | 43 | @synthesize timestamp = _timestamp; |
44 | 44 | ||
45 | -+ (id)cacheObject:(id)anObject forTile:(RMTile)aTile withCacheKey:(NSString *)aCacheKey | 45 | ++ (instancetype)cacheObject:(id)anObject forTile:(RMTile)aTile withCacheKey:(NSString *)aCacheKey |
46 | { | 46 | { |
47 | return [[self alloc] initWithObject:anObject forTile:aTile withCacheKey:aCacheKey]; | 47 | return [[self alloc] initWithObject:anObject forTile:aTile withCacheKey:aCacheKey]; |
48 | } | 48 | } |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | 34 | ||
35 | /** Access the shared instance of the configuration. | 35 | /** Access the shared instance of the configuration. |
36 | * @return The shared configuration instance. */ | 36 | * @return The shared configuration instance. */ |
37 | -+ (RMConfiguration *)configuration; | 37 | ++ (instancetype)configuration; |
38 | 38 | ||
39 | - (RMConfiguration *)initWithPath:(NSString *)path; | 39 | - (RMConfiguration *)initWithPath:(NSString *)path; |
40 | 40 | ||
@@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
65 | 65 | ||
66 | @interface NSData (RMUserAgent) | 66 | @interface NSData (RMUserAgent) |
67 | 67 | ||
68 | -+ (NSData *)brandedDataWithContentsOfURL:(NSURL *)aURL; | 68 | ++ (instancetype)brandedDataWithContentsOfURL:(NSURL *)aURL; |
69 | 69 | ||
70 | @end | 70 | @end |
71 | 71 | ||
@@ -73,6 +73,6 @@ | @@ -73,6 +73,6 @@ | ||
73 | 73 | ||
74 | @interface NSString (RMUserAgent) | 74 | @interface NSString (RMUserAgent) |
75 | 75 | ||
76 | -+ (id)brandedStringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error; | 76 | ++ (instancetype)brandedStringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error; |
77 | 77 | ||
78 | @end | 78 | @end |
@@ -46,7 +46,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | @@ -46,7 +46,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | ||
46 | 46 | ||
47 | @implementation NSData (RMUserAgent) | 47 | @implementation NSData (RMUserAgent) |
48 | 48 | ||
49 | -+ (NSData *)brandedDataWithContentsOfURL:(NSURL *)aURL | 49 | ++ (instancetype)brandedDataWithContentsOfURL:(NSURL *)aURL |
50 | { | 50 | { |
51 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aURL]; | 51 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aURL]; |
52 | 52 | ||
@@ -61,7 +61,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | @@ -61,7 +61,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | ||
61 | 61 | ||
62 | @implementation NSString (RMUserAgent) | 62 | @implementation NSString (RMUserAgent) |
63 | 63 | ||
64 | -+ (id)brandedStringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error | 64 | ++ (instancetype)brandedStringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error |
65 | { | 65 | { |
66 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | 66 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; |
67 | 67 | ||
@@ -92,7 +92,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | @@ -92,7 +92,7 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; | ||
92 | 92 | ||
93 | @synthesize userAgent=_userAgent; | 93 | @synthesize userAgent=_userAgent; |
94 | 94 | ||
95 | -+ (RMConfiguration *)configuration | 95 | ++ (instancetype)configuration |
96 | { | 96 | { |
97 | static dispatch_once_t onceToken; | 97 | static dispatch_once_t onceToken; |
98 | dispatch_once(&onceToken, ^{ | 98 | dispatch_once(&onceToken, ^{ |
@@ -43,8 +43,8 @@ | @@ -43,8 +43,8 @@ | ||
43 | // applies #wrapPointHorizontally to aPoint, and then clamps northing (Y coordinate) to projection's planetBounds | 43 | // applies #wrapPointHorizontally to aPoint, and then clamps northing (Y coordinate) to projection's planetBounds |
44 | - (RMProjectedPoint)constrainPointToBounds:(RMProjectedPoint)aPoint; | 44 | - (RMProjectedPoint)constrainPointToBounds:(RMProjectedPoint)aPoint; |
45 | 45 | ||
46 | -+ (RMProjection *)googleProjection; | ||
47 | -+ (RMProjection *)EPSGLatLong; | 46 | ++ (instancetype)googleProjection; |
47 | ++ (instancetype)EPSGLatLong; | ||
48 | 48 | ||
49 | - (id)initWithString:(NSString *)proj4String inBounds:(RMProjectedRect)projectedBounds; | 49 | - (id)initWithString:(NSString *)proj4String inBounds:(RMProjectedRect)projectedBounds; |
50 | 50 |
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | static RMProjection *_googleProjection = nil; | 50 | static RMProjection *_googleProjection = nil; |
51 | static RMProjection *_latitudeLongitudeProjection = nil; | 51 | static RMProjection *_latitudeLongitudeProjection = nil; |
52 | 52 | ||
53 | -+ (RMProjection *)googleProjection | 53 | ++ (instancetype)googleProjection |
54 | { | 54 | { |
55 | if (_googleProjection) | 55 | if (_googleProjection) |
56 | { | 56 | { |
@@ -66,7 +66,7 @@ static RMProjection *_latitudeLongitudeProjection = nil; | @@ -66,7 +66,7 @@ static RMProjection *_latitudeLongitudeProjection = nil; | ||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | -+ (RMProjection *)EPSGLatLong | 69 | ++ (instancetype)EPSGLatLong |
70 | { | 70 | { |
71 | if (_latitudeLongitudeProjection) | 71 | if (_latitudeLongitudeProjection) |
72 | { | 72 | { |
-
Please register or login to post a comment