Minor efficiency change in validate remove algorithm.

This commit is contained in:
Mitchell Livingston 2006-06-17 23:29:27 +00:00
parent 06a5457f2b
commit d9542e96a7
1 changed files with 10 additions and 5 deletions

View File

@ -1273,13 +1273,18 @@ static void sleepCallBack( void * controller, io_service_t y,
for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i]) for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
{ {
torrent = [fTorrents objectAtIndex: i]; torrent = [fTorrents objectAtIndex: i];
if ([torrent isActive]) if (!active && [torrent isActive])
{
active = YES; active = YES;
if ([torrent publicTorrent]) if (canDelete)
break;
}
if (!canDelete && [torrent publicTorrent])
{
canDelete = YES; canDelete = YES;
if (active)
if (active && canDelete) break;
break; }
} }
//append or remove ellipsis when needed //append or remove ellipsis when needed