mirror of
https://github.com/transmission/transmission
synced 2025-02-03 21:12:05 +00:00
tr_cpBlockAdd: small speedup.
This commit is contained in:
parent
7326f4db32
commit
eefa51c65c
1 changed files with 2 additions and 1 deletions
|
@ -159,7 +159,8 @@ void tr_cpBlockAdd( tr_completion_t * cp, int block )
|
|||
|
||||
if( !tr_cpBlockIsComplete( cp, block ) )
|
||||
{
|
||||
const int piece = tr_blockPiece( block );
|
||||
const int piece = block / cp->nBlocksInPiece;
|
||||
|
||||
++cp->completeBlocks[piece];
|
||||
|
||||
if( cp->completeBlocks[piece] == tr_cpCountBlocks( cp, piece ) )
|
||||
|
|
Loading…
Reference in a new issue