cleanup for last commit

This commit is contained in:
Mitchell Livingston 2008-01-23 18:47:34 +00:00
parent 320e519a43
commit 230d490637
1 changed files with 4 additions and 4 deletions

View File

@ -309,17 +309,17 @@
NSMutableIndexSet * indexSet = [NSMutableIndexSet indexSet];
NSUInteger i, next;
for (i = [selectedIndexes firstIndex]; i != NSNotFound; i = next)
for (i = [selectedIndexes firstIndex]; i != NSNotFound; i = [selectedIndexes indexGreaterThanIndex: i])
{
next = [selectedIndexes indexGreaterThanIndex: i];
if (![fGroupIndexes containsIndex: i])
[indexSet addIndex: i];
else
{
int count = next != NSNotFound ? next - i - 1 : [fTorrents count] - i - 1;
unsigned nextGroup = [fGroupIndexes indexGreaterThanIndex: i],
count = nextGroup != NSNotFound ? nextGroup - i - 1 : [fTorrents count] - i - 1;
[indexSet addIndexesInRange: NSMakeRange(i+1, count)];
i += count;
i = nextGroup-1;
}
}
[fTorrents objectsAtIndexes: indexSet];