aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryController.m
diff options
context:
space:
mode:
authorMax Lohrmann <dmoagx@users.noreply.github.com>2017-03-12 09:46:59 +0100
committerMax Lohrmann <dmoagx@users.noreply.github.com>2017-03-12 09:46:59 +0100
commit95250e0f0c5780ac113a9a4c948c452038b4c02a (patch)
tree18d41b1a2bae49b38e58d986e5d3934aac8b3227 /Source/SPQueryController.m
parentf5e022b6667815a05c0b2478db07f50af2e52d0b (diff)
downloadsequelpro-95250e0f0c5780ac113a9a4c948c452038b4c02a.tar.gz
sequelpro-95250e0f0c5780ac113a9a4c948c452038b4c02a.tar.bz2
sequelpro-95250e0f0c5780ac113a9a4c948c452038b4c02a.zip
Replace some legacy NSIndexSet enumeration with 10.6+ style -enumerateIndexesUsingBlock:
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r--Source/SPQueryController.m9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index c57621d8..dbdc3d44 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -158,16 +158,13 @@ static SPQueryController *sharedQueryController = nil;
NSMutableString *string = [NSMutableString string];
NSIndexSet *rows = [consoleTableView selectedRowIndexes];
- NSUInteger i = [rows firstIndex];
-
BOOL includeTimestamps = ![[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] isHidden];
BOOL includeConnections = ![[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] isHidden];
BOOL includeDatabases = ![[consoleTableView tableColumnWithIdentifier:SPTableViewDatabaseColumnID] isHidden];
[string setString:@""];
- while (i != NSNotFound)
- {
+ [rows enumerateIndexesUsingBlock:^(NSUInteger i, BOOL * _Nonnull stop) {
if (i < [messagesVisibleSet count]) {
SPConsoleMessage *message = NSArrayObjectAtIndex(messagesVisibleSet, i);
@@ -195,9 +192,7 @@ static SPQueryController *sharedQueryController = nil;
[string appendFormat:@"%@\n", [message message]];
}
-
- i = [rows indexGreaterThanIndex:i];
- }
+ }];
NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];