one less initialization

This commit is contained in:
Mitchell Livingston 2007-01-16 03:32:09 +00:00
parent 5e17b596d6
commit 212ec30187
1 changed files with 2 additions and 2 deletions

View File

@ -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];