aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.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/SPDatabaseDocument.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/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 7ab802da..88ab58ed 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -1841,7 +1841,7 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
// show syntax(es) in sheet
if (sender == self) {
NSPasteboard *pb = [NSPasteboard generalPasteboard];
- [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
+ [pb declareTypes:@[NSStringPboardType] owner:self];
[pb setString:createSyntax forType:NSStringPboardType];
// Table syntax copied Growl notification
@@ -2330,7 +2330,7 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
{
NSSavePanel *panel = [NSSavePanel savePanel];
- [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionSQL]];
+ [panel setAllowedFileTypes:@[SPFileExtensionSQL]];
[panel setExtensionHidden:NO];
[panel setAllowsOtherFileTypes:YES];
@@ -2361,7 +2361,7 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
// Copy to the clipboard
NSPasteboard *pb = [NSPasteboard generalPasteboard];
- [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
+ [pb declareTypes:@[NSStringPboardType] owner:self];
[pb setString:createSyntax forType:NSStringPboardType];
// Table syntax copied Growl notification
@@ -5264,7 +5264,7 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:&inError];
[fm removeItemAtPath:queryFileName error:nil];
if(inError == nil && query && [query length]) {
- [customQueryInstance performQueries:[NSArray arrayWithObject:query] withCallback:NULL];
+ [customQueryInstance performQueries:@[query] withCallback:NULL];
}
}
return;