diff options
author | Max <post@wickenrode.com> | 2014-12-13 18:02:01 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-12-13 18:02:01 +0100 |
commit | 876dde21d97897ad4ee98aa0d6b11898282982ce (patch) | |
tree | 49dfcdf83e94937bdc7a3f09ca82ccacec3a5aed /Source/SPEditorPreferencePane.m | |
parent | 994057ae2a82dc110a385ced4239ce49cc0601f8 (diff) | |
download | sequelpro-876dde21d97897ad4ee98aa0d6b11898282982ce.tar.gz sequelpro-876dde21d97897ad4ee98aa0d6b11898282982ce.tar.bz2 sequelpro-876dde21d97897ad4ee98aa0d6b11898282982ce.zip |
Change [NSArray arrayWithObject:] to @[] literal
Note: [NSArray arrayWithObjects:...,nil] is left unchanged as that could possibly cause a NPE if converted to @[]
Diffstat (limited to 'Source/SPEditorPreferencePane.m')
-rw-r--r-- | Source/SPEditorPreferencePane.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m index 93e5c42b..e5250e1d 100644 --- a/Source/SPEditorPreferencePane.m +++ b/Source/SPEditorPreferencePane.m @@ -131,7 +131,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined"; { NSSavePanel *panel = [NSSavePanel savePanel]; - [panel setAllowedFileTypes:[NSArray arrayWithObject:SPColorThemeFileExtension]]; + [panel setAllowedFileTypes:@[SPColorThemeFileExtension]]; [panel setExtensionHidden:NO]; [panel setAllowsOtherFileTypes:NO]; @@ -770,7 +770,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined"; if ([fm fileExistsAtPath:themePath isDirectory:nil]) { NSArray *allItemsRaw = [fm contentsOfDirectoryAtPath:themePath error:NULL]; - if(!allItemsRaw) return [NSArray array]; + if(!allItemsRaw) return @[]; // Filter out all themes NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF ENDSWITH %@", [NSString stringWithFormat:@".%@", SPColorThemeFileExtension]]; @@ -791,7 +791,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined"; return (NSArray *)allItems; } - return [NSArray array]; + return @[]; } - (void)_saveColorThemeAtPath:(NSString *)path |