Small fixes.

This commit is contained in:
Patryk Stępień 2011-09-21 18:42:11 +02:00
parent 1d27fa9c03
commit 73132afe6c
2 changed files with 3 additions and 3 deletions

View file

@ -189,8 +189,8 @@ void DownloadedPiecesBar::updateImage()
void DownloadedPiecesBar::setProgress(const libtorrent::bitfield &bf, const libtorrent::bitfield &bf_dl) void DownloadedPiecesBar::setProgress(const libtorrent::bitfield &bf, const libtorrent::bitfield &bf_dl)
{ {
pieces.assign(bf.bytes(), bf.size()); pieces = libtorrent::bitfield(bf);
pieces_dl.assign(bf_dl.bytes(), bf_dl.size()); pieces_dl = libtorrent::bitfield(bf_dl);
updateImage(); updateImage();
update(); update();

View file

@ -182,7 +182,7 @@ void PieceAvailabilityBar::updateImage()
void PieceAvailabilityBar::setAvailability(const std::vector<int>& avail) void PieceAvailabilityBar::setAvailability(const std::vector<int>& avail)
{ {
pieces.assign(avail.begin(), avail.end()); pieces = std::vector<int>(avail);
updateImage(); updateImage();
update(); update();