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])
{
torrent = [fTorrents objectAtIndex: i];
if ([torrent isActive])
if (!active && [torrent isActive])
{
active = YES;
if ([torrent publicTorrent])
if (canDelete)
break;
}
if (!canDelete && [torrent publicTorrent])
{
canDelete = YES;
if (active && canDelete)
break;
if (active)
break;
}
}
//append or remove ellipsis when needed