remove dead code tr_file_stat::completionStatus
This commit is contained in:
parent
248837e735
commit
c65d6a20c3
|
@ -68,8 +68,6 @@ readOrWriteBytes ( const tr_torrent * tor,
|
||||||
|
|
||||||
tr_buildPath ( path, sizeof(path), tor->destination, file->name, NULL );
|
tr_buildPath ( path, sizeof(path), tor->destination, file->name, NULL );
|
||||||
|
|
||||||
fprintf( stderr, "readOrWriteBytes: [%s]\n", path );
|
|
||||||
|
|
||||||
if( !file->length )
|
if( !file->length )
|
||||||
return 0;
|
return 0;
|
||||||
else if ((ioMode==TR_IO_READ) && stat( path, &sb ) ) /* fast check to make sure file exists */
|
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 )
|
for( i=0; i<n; ++i, ++walk )
|
||||||
{
|
{
|
||||||
const tr_file * file = tor->info.files + i;
|
const tr_file * file = tor->info.files + i;
|
||||||
cp_status_t cp;
|
|
||||||
|
|
||||||
walk->bytesCompleted = fileBytesCompleted( tor, i );
|
walk->bytesCompleted = fileBytesCompleted( tor, i );
|
||||||
|
|
||||||
walk->progress = file->length
|
walk->progress = file->length
|
||||||
? walk->bytesCompleted / (float)file->length
|
? walk->bytesCompleted / (float)file->length
|
||||||
: 1.0;
|
: 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;
|
*fileCount = n;
|
||||||
|
|
|
@ -697,7 +697,6 @@ struct tr_file_stat
|
||||||
{
|
{
|
||||||
uint64_t bytesCompleted;
|
uint64_t bytesCompleted;
|
||||||
float progress;
|
float progress;
|
||||||
cp_status_t completionStatus;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tr_peer_stat
|
struct tr_peer_stat
|
||||||
|
|
Loading…
Reference in New Issue