mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk libT) #3955 "tr_torrentNext() should be inlined" -- fixed.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user