mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Little piece availability computation optimization
This commit is contained in:
parent
4f9eca78d9
commit
1bfadf5219
1 changed files with 1 additions and 1 deletions
|
@ -60,8 +60,8 @@ public:
|
|||
painter.drawPoint(0,0);
|
||||
} else {
|
||||
// Look for maximum value
|
||||
average = std::accumulate(avail.begin(), avail.end(), 0)/(double)avail.size();
|
||||
uint nb_pieces = avail.size();
|
||||
average = std::accumulate(avail.begin(), avail.end(), 0)/(double)nb_pieces;
|
||||
pixmap = QPixmap(nb_pieces, 1);
|
||||
QPainter painter(&pixmap);
|
||||
std::vector<int>::iterator it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue