mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-04 21:29:21 +00:00
Sort the transfer chunks by index
The default comparison ordered the pointers, not the chunk indexes.
This commit is contained in:
@@ -57,7 +57,8 @@ WindowDownloadChunksSeen::redraw() {
|
||||
const torrent::TransferList* transfers = m_download->download()->transfer_list();
|
||||
std::vector<torrent::BlockList*> transferChunks(transfers->begin(), transfers->end());
|
||||
|
||||
std::sort(transferChunks.begin(), transferChunks.end());
|
||||
std::sort(transferChunks.begin(), transferChunks.end(),
|
||||
[](const auto& left, const auto& right) { return left->index() < right->index(); });
|
||||
|
||||
std::vector<torrent::BlockList*>::const_iterator itrTransfer = transferChunks.begin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user