Skip to content

Commit

Permalink
Remove redundant code and associated warning. No longer required after
Browse files Browse the repository at this point in the history
  • Loading branch information
stuconnolly committed Mar 22, 2017
1 parent 9ed7fd7 commit bde46d2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions Source/SPConnectionController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ - (void)_sortTreeNode:(SPTreeNode *)node usingKey:(NSString *)key
// If this node only has one child and it's not another group node, don't bother proceeding
if (([nodes count] == 1) && (![[nodes objectAtIndex:0] isGroup])) {
[nodes release];
return;
return;
}

for (SPTreeNode *treeNode in nodes)
Expand All @@ -1599,19 +1599,6 @@ - (void)_sortTreeNode:(SPTreeNode *)node usingKey:(NSString *)key
[self _sortTreeNode:treeNode usingKey:key];
}
}
#warning What is this supposed to do? We create an empty indexset, iterate it (still empty) and release it again!?
NSMutableIndexSet *indexes = [[NSMutableIndexSet alloc] init];

NSUInteger i = [indexes lastIndex];

while (i != NSNotFound)
{
[nodes removeObjectAtIndex:i];

i = [indexes indexLessThanIndex:i];
}

[indexes release];

[nodes sortUsingFunction:_compareFavoritesUsingKey context:key];

Expand Down

0 comments on commit bde46d2

Please sign in to comment.