one less initialization
This commit is contained in:
parent
5e17b596d6
commit
212ec30187
|
@ -1000,7 +1000,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
while ((torrent = [enumerator nextObject]))
|
while ((torrent = [enumerator nextObject]))
|
||||||
[torrent setWaitToStart: NO];
|
[torrent setWaitToStart: NO];
|
||||||
|
|
||||||
NSNumber * lowestOrderValue = [NSNumber numberWithInt: [torrents count]], * currentOrderValue;
|
NSNumber * lowestOrderValue = nil, * currentOrderValue;
|
||||||
|
|
||||||
enumerator = [torrents objectEnumerator];
|
enumerator = [torrents objectEnumerator];
|
||||||
while ((torrent = [enumerator nextObject]))
|
while ((torrent = [enumerator nextObject]))
|
||||||
|
@ -1014,7 +1014,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
|
|
||||||
//determine lowest order value
|
//determine lowest order value
|
||||||
currentOrderValue = [torrent orderValue];
|
currentOrderValue = [torrent orderValue];
|
||||||
if ([lowestOrderValue compare: currentOrderValue] == NSOrderedDescending)
|
if (!lowestOrderValue || [lowestOrderValue compare: currentOrderValue] == NSOrderedDescending)
|
||||||
lowestOrderValue = currentOrderValue;
|
lowestOrderValue = currentOrderValue;
|
||||||
|
|
||||||
[fTorrents removeObject: torrent];
|
[fTorrents removeObject: torrent];
|
||||||
|
|
Loading…
Reference in New Issue