mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Disable flooding debug messages
This commit is contained in:
parent
364e4277ec
commit
c95e181378
1 changed files with 0 additions and 2 deletions
|
@ -63,12 +63,10 @@ static QPair<int, int> get_file_extremity_pieces(const torrent_info& t, int file
|
||||||
// Determine the first and last piece of the file
|
// Determine the first and last piece of the file
|
||||||
int first_piece = floor((file.offset + 1) / (float) piece_size);
|
int first_piece = floor((file.offset + 1) / (float) piece_size);
|
||||||
Q_ASSERT(first_piece >= 0 && first_piece < num_pieces);
|
Q_ASSERT(first_piece >= 0 && first_piece < num_pieces);
|
||||||
qDebug("First piece of the file is %d/%d", first_piece, num_pieces - 1);
|
|
||||||
|
|
||||||
int num_pieces_in_file = ceil(file.size / (float) piece_size);
|
int num_pieces_in_file = ceil(file.size / (float) piece_size);
|
||||||
int last_piece = first_piece + num_pieces_in_file - 1;
|
int last_piece = first_piece + num_pieces_in_file - 1;
|
||||||
Q_ASSERT(last_piece >= 0 && last_piece < num_pieces);
|
Q_ASSERT(last_piece >= 0 && last_piece < num_pieces);
|
||||||
qDebug("last piece of the file is %d/%d", last_piece, num_pieces - 1);
|
|
||||||
|
|
||||||
return qMakePair(first_piece, last_piece);
|
return qMakePair(first_piece, last_piece);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue