From 876dde21d97897ad4ee98aa0d6b11898282982ce Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 13 Dec 2014 18:02:01 +0100 Subject: Change [NSArray arrayWithObject:] to @[] literal Note: [NSArray arrayWithObjects:...,nil] is left unchanged as that could possibly cause a NPE if converted to @[] --- Source/SPContentFilterManager.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/SPContentFilterManager.m') diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index ea7c49b1..d6fed676 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -143,7 +143,7 @@ static NSString *SPExportFilterAction = @"SPExportFilter"; [contentFilterTextView setString:@""]; // Register drag types - [contentFilterTableView registerForDraggedTypes:[NSArray arrayWithObject:SPContentFilterPasteboardDragType]]; + [contentFilterTableView registerForDraggedTypes:@[SPContentFilterPasteboardDragType]]; [contentFilterArrayController setContent:contentFilters]; [contentFilterTableView reloadData]; @@ -333,7 +333,7 @@ static NSString *SPExportFilterAction = @"SPExportFilter"; #ifndef SP_CODA NSSavePanel *panel = [NSSavePanel savePanel]; - [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionDefault]]; + [panel setAllowedFileTypes:@[SPFileExtensionDefault]]; [panel setExtensionHidden:NO]; [panel setAllowsOtherFileTypes:NO]; @@ -556,7 +556,7 @@ static NSString *SPExportFilterAction = @"SPExportFilter"; - (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rows toPasteboard:(NSPasteboard*)pboard { - NSArray *pboardTypes = [NSArray arrayWithObject:SPContentFilterPasteboardDragType]; + NSArray *pboardTypes = @[SPContentFilterPasteboardDragType]; NSUInteger originalRow = [rows firstIndex]; if(originalRow < 1) return NO; -- cgit v1.2.3