remove unused function _tr_blockPosInPiece()

This commit is contained in:
Charles Kerr 2007-07-24 16:04:43 +00:00
parent 17a8ae9fa2
commit e1c18610be
2 changed files with 1 additions and 12 deletions

View File

@ -127,9 +127,6 @@ int _tr_blockPiece( const tr_torrent_t * tor, int block );
#define tr_blockSize(a) _tr_blockSize(tor,a)
int _tr_blockSize( const tr_torrent_t * tor, int block );
#define tr_blockPosInPiece(a) _tr_blockPosInPiece(tor,a)
int _tr_blockPosInPiece( const tr_torrent_t * tor, int block );
#define tr_pieceCountBlocks(a) _tr_pieceCountBlocks(tor,a)
int _tr_pieceCountBlocks( const tr_torrent_t * tor, int piece );

View File

@ -1369,8 +1369,7 @@ tr_torrentSetFileDLs ( tr_torrent_t * tor,
int _tr_blockPiece( const tr_torrent_t * tor, int block )
{
const tr_info_t * inf = &tor->info;
return block / ( inf->pieceSize / tor->blockSize );
return (block * tor->blockSize) / tor->info.pieceSize;
}
int _tr_blockSize( const tr_torrent_t * tor, int block )
@ -1387,13 +1386,6 @@ int _tr_blockSize( const tr_torrent_t * tor, int block )
return dummy;
}
int _tr_blockPosInPiece( const tr_torrent_t * tor, int block )
{
const tr_info_t * inf = &tor->info;
return tor->blockSize *
( block % ( inf->pieceSize / tor->blockSize ) );
}
int _tr_pieceCountBlocks( const tr_torrent_t * tor, int piece )
{
const tr_info_t * inf = &tor->info;