mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
- Little piece availability computation optimization
This commit is contained in:
parent
4f9eca78d9
commit
1bfadf5219
@ -60,8 +60,8 @@ public:
|
|||||||
painter.drawPoint(0,0);
|
painter.drawPoint(0,0);
|
||||||
} else {
|
} else {
|
||||||
// Look for maximum value
|
// Look for maximum value
|
||||||
average = std::accumulate(avail.begin(), avail.end(), 0)/(double)avail.size();
|
|
||||||
uint nb_pieces = avail.size();
|
uint nb_pieces = avail.size();
|
||||||
|
average = std::accumulate(avail.begin(), avail.end(), 0)/(double)nb_pieces;
|
||||||
pixmap = QPixmap(nb_pieces, 1);
|
pixmap = QPixmap(nb_pieces, 1);
|
||||||
QPainter painter(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
std::vector<int>::iterator it;
|
std::vector<int>::iterator it;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user