(trunk libT) #3955 "tr_torrentNext() should be inlined" -- fixed.

This commit is contained in:
Jordan Lee 2011-01-29 18:54:43 +00:00
parent 56a81ab172
commit bbe51e1faf
2 changed files with 6 additions and 21 deletions

View File

@ -2348,24 +2348,6 @@ tr_sessionSetTorrentFile( tr_session * session,
tr_bencDictAddStr( session->metainfoLookup, hashString, filename );
}
tr_torrent*
tr_torrentNext( tr_session * session,
tr_torrent * tor )
{
tr_torrent * ret;
assert( !session || tr_isSession( session ) );
if( !session )
ret = NULL;
else if( !tor )
ret = session->torrentList;
else
ret = tor->next;
return ret;
}
/***
****
***/

View File

@ -91,9 +91,6 @@ void tr_torrentSetPieceChecked( tr_torrent * tor,
void tr_torrentSetChecked( tr_torrent * tor, time_t when );
tr_torrent* tr_torrentNext( tr_session * session,
tr_torrent * current );
void tr_torrentCheckSeedLimit( tr_torrent * tor );
/** save a torrent's .resume file if it's changed since the last time it was saved */
@ -252,6 +249,12 @@ struct tr_torrent
tr_bool finishedSeedingByIdle;
};
static inline tr_torrent*
tr_torrentNext( tr_session * session, tr_torrent * current )
{
return current ? current->next : session->torrentList;
}
/* get the index of this piece's first block */
static inline tr_block_index_t
tr_torPieceFirstBlock( const tr_torrent * tor, const tr_piece_index_t piece )