mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
remove dead code tr_file_stat::completionStatus
This commit is contained in:
parent
248837e735
commit
c65d6a20c3
3 changed files with 0 additions and 13 deletions
|
@ -68,8 +68,6 @@ readOrWriteBytes ( const tr_torrent * tor,
|
|||
|
||||
tr_buildPath ( path, sizeof(path), tor->destination, file->name, NULL );
|
||||
|
||||
fprintf( stderr, "readOrWriteBytes: [%s]\n", path );
|
||||
|
||||
if( !file->length )
|
||||
return 0;
|
||||
else if ((ioMode==TR_IO_READ) && stat( path, &sb ) ) /* fast check to make sure file exists */
|
||||
|
|
|
@ -847,22 +847,12 @@ tr_torrentFiles( const tr_torrent * tor, int * fileCount )
|
|||
for( i=0; i<n; ++i, ++walk )
|
||||
{
|
||||
const tr_file * file = tor->info.files + i;
|
||||
cp_status_t cp;
|
||||
|
||||
walk->bytesCompleted = fileBytesCompleted( tor, i );
|
||||
|
||||
walk->progress = file->length
|
||||
? walk->bytesCompleted / (float)file->length
|
||||
: 1.0;
|
||||
|
||||
if( walk->bytesCompleted >= file->length )
|
||||
cp = TR_CP_COMPLETE;
|
||||
else if( tor->info.files[i].dnd )
|
||||
cp = TR_CP_DONE;
|
||||
else
|
||||
cp = TR_CP_INCOMPLETE;
|
||||
|
||||
walk->completionStatus = cp;
|
||||
}
|
||||
|
||||
*fileCount = n;
|
||||
|
|
|
@ -697,7 +697,6 @@ struct tr_file_stat
|
|||
{
|
||||
uint64_t bytesCompleted;
|
||||
float progress;
|
||||
cp_status_t completionStatus;
|
||||
};
|
||||
|
||||
struct tr_peer_stat
|
||||
|
|
Loading…
Reference in a new issue