1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

(trunk libT) small CPU optimization in bitfield.c's countRange()

This commit is contained in:
Jordan Lee 2011-05-10 03:43:06 +00:00
parent 6a38a368d6
commit 0b11909854

View file

@ -99,8 +99,7 @@ countRange( const tr_bitfield * b, size_t begin, size_t end )
/* middle bytes */
for( i=first_byte+1; i<b->alloc_count && i<last_byte; ++i )
if( trueBitCount[b->bits[i]] )
ret += trueBitCount[b->bits[i]];
ret += trueBitCount[b->bits[i]];
/* last byte */
if( last_byte < b->alloc_count ) {