1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

When moving objects in an array from an index to a lower index, no need to first fill the final destination with the object before it. This is pointless and causes issues when moving the item to index 0.

This commit is contained in:
Mitchell Livingston 2011-06-07 23:15:12 +00:00
parent 6cde66f025
commit a421f2289f

View file

@ -41,7 +41,7 @@
}
else
{
for (NSUInteger i = fromIndex; i >= toIndex; --i)
for (NSUInteger i = fromIndex; i > toIndex; --i)
[self replaceObjectAtIndex: i withObject: [self objectAtIndex: i-1]];
}
[self replaceObjectAtIndex: toIndex withObject: object];