diff options
Diffstat (limited to 'platform/macos/app')
-rw-r--r-- | platform/macos/app/AppDelegate.m | 14 | ||||
-rw-r--r-- | platform/macos/app/MGLStyle+MBXAdditions.h | 2 | ||||
-rw-r--r-- | platform/macos/app/MGLStyle+MBXAdditions.m | 6 | ||||
-rw-r--r-- | platform/macos/app/MapDocument.m | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/platform/macos/app/AppDelegate.m b/platform/macos/app/AppDelegate.m index 0d780424f9..f7b35d0c83 100644 --- a/platform/macos/app/AppDelegate.m +++ b/platform/macos/app/AppDelegate.m @@ -29,7 +29,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; } } -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingCountOfResourcesCompleted { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCountOfResourcesCompleted { return [NSSet setWithObjects:@"progress", nil]; } @@ -37,7 +37,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; return self.progress.countOfResourcesCompleted; } -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingCountOfResourcesExpected { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCountOfResourcesExpected { return [NSSet setWithObjects:@"progress", nil]; } @@ -45,7 +45,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; return self.progress.countOfResourcesExpected; } -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingCountOfBytesCompleted { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCountOfBytesCompleted { return [NSSet setWithObjects:@"progress", nil]; } @@ -53,7 +53,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; return self.progress.countOfBytesCompleted; } -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingCountOfTilesCompleted { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCountOfTilesCompleted { return [NSSet setWithObjects:@"progress", nil]; } @@ -61,7 +61,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; return self.progress.countOfTilesCompleted; } -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingCountOfTileBytesCompleted { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingCountOfTileBytesCompleted { return [NSSet setWithObjects:@"progress", nil]; } @@ -157,11 +157,11 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { // mapboxgl://?center=29.95,-90.066667&zoom=14&bearing=45&pitch=30 NSURL *url = [NSURL URLWithString:[event paramDescriptorForKeyword:keyDirectObject].stringValue]; - NS_MUTABLE_DICTIONARY_OF(NSString *, NSString *) *params = [[NSMutableDictionary alloc] init]; + NSMutableDictionary<NSString *, NSString *> *params = [[NSMutableDictionary alloc] init]; for (NSString *param in [url.query componentsSeparatedByString:@"&"]) { NSArray *parts = [param componentsSeparatedByString:@"="]; if (parts.count >= 2) { - params[parts[0]] = [parts[1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + params[parts[0]] = [parts[1] stringByRemovingPercentEncoding]; } } diff --git a/platform/macos/app/MGLStyle+MBXAdditions.h b/platform/macos/app/MGLStyle+MBXAdditions.h index dcaf42af28..29c2cda867 100644 --- a/platform/macos/app/MGLStyle+MBXAdditions.h +++ b/platform/macos/app/MGLStyle+MBXAdditions.h @@ -2,6 +2,6 @@ @interface MGLStyle (MBXAdditions) -@property (nonatomic, strong) NS_ARRAY_OF(__kindof MGLStyleLayer *) *reversedLayers; +@property (nonatomic, strong) NSArray<__kindof MGLStyleLayer *> *reversedLayers; @end diff --git a/platform/macos/app/MGLStyle+MBXAdditions.m b/platform/macos/app/MGLStyle+MBXAdditions.m index be571d8b30..a0773cc2c0 100644 --- a/platform/macos/app/MGLStyle+MBXAdditions.m +++ b/platform/macos/app/MGLStyle+MBXAdditions.m @@ -2,15 +2,15 @@ @implementation MGLStyle (MBXAdditions) -+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingReversedLayers { ++ (NSSet<NSString *> *)keyPathsForValuesAffectingReversedLayers { return [NSSet setWithObject:@"layers"]; } -- (NS_ARRAY_OF(__kindof MGLStyleLayer *) *)reversedLayers { +- (NSArray<__kindof MGLStyleLayer *> *)reversedLayers { return self.layers.reverseObjectEnumerator.allObjects; } -- (void)setReversedLayers:(NS_ARRAY_OF(__kindof MGLStyleLayer *) *)reversedLayers { +- (void)setReversedLayers:(NSArray<__kindof MGLStyleLayer *> *)reversedLayers { self.layers = reversedLayers.reverseObjectEnumerator.allObjects; } diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index 9b18dbd761..7be500ae6a 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -19,7 +19,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = { { .latitude = -13.15589555, .longitude = -74.2178961777998 }, }; -NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotation>) *shapes) { +NSArray<id <MGLAnnotation>> *MBXFlattenedShapes(NSArray<id <MGLAnnotation>> *shapes) { NSMutableArray *flattenedShapes = [NSMutableArray arrayWithCapacity:shapes.count]; for (id <MGLAnnotation> shape in shapes) { NSArray *subshapes; @@ -340,7 +340,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio } - (void)toggleStyleLayersAtArrangedObjectIndexes:(NSIndexSet *)indices { - NS_ARRAY_OF(MGLStyleLayer *) *layers = [self.mapView.style.reversedLayers objectsAtIndexes:indices]; + NSArray<MGLStyleLayer *> *layers = [self.mapView.style.reversedLayers objectsAtIndexes:indices]; BOOL isVisible = layers.firstObject.visible; [self.undoManager registerUndoWithTarget:self handler:^(MapDocument * _Nonnull target) { [target toggleStyleLayersAtArrangedObjectIndexes:indices]; @@ -376,7 +376,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio [self deleteStyleLayersAtArrangedObjectIndexes:indices]; } -- (void)insertStyleLayers:(NS_ARRAY_OF(MGLStyleLayer *) *)layers atArrangedObjectIndexes:(NSIndexSet *)indices { +- (void)insertStyleLayers:(NSArray<MGLStyleLayer *> *)layers atArrangedObjectIndexes:(NSIndexSet *)indices { [self.undoManager registerUndoWithTarget:self handler:^(id _Nonnull target) { [self deleteStyleLayersAtArrangedObjectIndexes:indices]; }]; @@ -396,7 +396,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio } - (void)deleteStyleLayersAtArrangedObjectIndexes:(NSIndexSet *)indices { - NS_ARRAY_OF(MGLStyleLayer *) *layers = [self.mapView.style.reversedLayers objectsAtIndexes:indices]; + NSArray<MGLStyleLayer *> *layers = [self.mapView.style.reversedLayers objectsAtIndexes:indices]; [self.undoManager registerUndoWithTarget:self handler:^(id _Nonnull target) { [self insertStyleLayers:layers atArrangedObjectIndexes:indices]; }]; @@ -572,7 +572,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio [self continueWorldTourWithRemainingAnnotations:annotations]; } -- (void)continueWorldTourWithRemainingAnnotations:(NS_MUTABLE_ARRAY_OF(MGLPointAnnotation *) *)annotations { +- (void)continueWorldTourWithRemainingAnnotations:(NSMutableArray<MGLPointAnnotation *> *)annotations { MGLPointAnnotation *nextAnnotation = annotations.firstObject; if (!nextAnnotation || !_isTouringWorld) { _isTouringWorld = NO; @@ -1236,7 +1236,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio #pragma mark NSSharingServicePickerDelegate methods -- (NS_ARRAY_OF(NSSharingService *) *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items proposedSharingServices:(NS_ARRAY_OF(NSSharingService *) *)proposedServices { +- (NSArray<NSSharingService *> *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items proposedSharingServices:(NSArray<NSSharingService *> *)proposedServices { NSURL *shareURL = self.shareURL; NSURL *browserURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:shareURL]; NSImage *browserIcon = [[NSWorkspace sharedWorkspace] iconForFile:browserURL.path]; |