Changeset 2480


Ignore:
Timestamp:
Jul 24, 2007, 4:04:43 PM (15 years ago)
Author:
charles
Message:

remove unused function _tr_blockPosInPiece()

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/internal.h

    r2462 r2480  
    128128int _tr_blockSize( const tr_torrent_t * tor, int block );
    129129
    130 #define tr_blockPosInPiece(a) _tr_blockPosInPiece(tor,a)
    131 int _tr_blockPosInPiece( const tr_torrent_t * tor, int block );
    132 
    133130#define tr_pieceCountBlocks(a) _tr_pieceCountBlocks(tor,a)
    134131int _tr_pieceCountBlocks( const tr_torrent_t * tor, int piece );
  • trunk/libtransmission/torrent.c

    r2474 r2480  
    13701370int _tr_blockPiece( const tr_torrent_t * tor, int block )
    13711371{
    1372     const tr_info_t * inf = &tor->info;
    1373     return block / ( inf->pieceSize / tor->blockSize );
     1372    return (block * tor->blockSize) / tor->info.pieceSize;
    13741373}
    13751374
     
    13861385
    13871386    return dummy;
    1388 }
    1389 
    1390 int _tr_blockPosInPiece( const tr_torrent_t * tor, int block )
    1391 {
    1392     const tr_info_t * inf = &tor->info;
    1393     return tor->blockSize *
    1394         ( block % ( inf->pieceSize / tor->blockSize ) );
    13951387}
    13961388
Note: See TracChangeset for help on using the changeset viewer.