mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02:31 +00:00
initialize in vector directly
No need for std::copy. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
f0517e2748
commit
18d19e3dee
@@ -55,9 +55,8 @@ WindowDownloadChunksSeen::redraw() {
|
||||
|
||||
const torrent::Bitfield* bitfield = m_download->download()->file_list()->bitfield();
|
||||
const torrent::TransferList* transfers = m_download->download()->transfer_list();
|
||||
std::vector<torrent::BlockList*> transferChunks(transfers->size(), 0);
|
||||
std::vector<torrent::BlockList*> transferChunks(transfers->begin(), transfers->end());
|
||||
|
||||
std::copy(transfers->begin(), transfers->end(), transferChunks.begin());
|
||||
std::sort(transferChunks.begin(), transferChunks.end());
|
||||
|
||||
std::vector<torrent::BlockList*>::const_iterator itrTransfer = transferChunks.begin();
|
||||
|
||||
Reference in New Issue
Block a user