aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2014-12-13 18:02:01 +0100
committerMax <post@wickenrode.com>2014-12-13 18:02:01 +0100
commit876dde21d97897ad4ee98aa0d6b11898282982ce (patch)
tree49dfcdf83e94937bdc7a3f09ca82ccacec3a5aed /Source/SPAppController.m
parent994057ae2a82dc110a385ced4239ce49cc0601f8 (diff)
downloadsequelpro-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/SPAppController.m')
-rw-r--r--Source/SPAppController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 8aabce60..56da49cf 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -738,7 +738,7 @@
if([pathComponents count] > 2)
parameter = [pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count]-2)];
else
- parameter = [NSArray array];
+ parameter = @[];
NSFileManager *fm = [NSFileManager defaultManager];
@@ -1533,7 +1533,7 @@
if([[NSUserDefaults standardUserDefaults] objectForKey:SPBundleDeletedDefaultBundlesKey])
deletedDefaultBundles = [[[NSUserDefaults standardUserDefaults] objectForKey:SPBundleDeletedDefaultBundlesKey] retain];
else
- deletedDefaultBundles = [[NSArray array] retain];
+ deletedDefaultBundles = [@[] retain];
NSMutableString *infoAboutUpdatedDefaultBundles = [NSMutableString string];
BOOL doBundleUpdate = ([[NSUserDefaults standardUserDefaults] objectForKey:@"doBundleUpdate"]) ? YES : NO;
@@ -1775,7 +1775,7 @@
// Sort items for menus
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:SPBundleInternLabelKey ascending:YES] autorelease];
for(NSString* scope in [bundleItems allKeys]) {
- [[bundleItems objectForKey:scope] sortUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]];
+ [[bundleItems objectForKey:scope] sortUsingDescriptors:@[sortDescriptor]];
[[bundleCategories objectForKey:scope] sortUsingSelector:@selector(compare:)];
}
}
@@ -1949,7 +1949,7 @@
// Sort if more than one found
if([assignedKeyEquivalents count] > 1) {
NSSortDescriptor *aSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease];
- NSArray *sorted = [assignedKeyEquivalents sortedArrayUsingDescriptors:[NSArray arrayWithObject:aSortDescriptor]];
+ NSArray *sorted = [assignedKeyEquivalents sortedArrayUsingDescriptors:@[aSortDescriptor]];
[assignedKeyEquivalents setArray:sorted];
}
}