initialize in vector directly

No need for std::copy.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-06-16 18:07:41 -07:00
committed by Jari Sundell
parent f0517e2748
commit 18d19e3dee
+1 -2
View File
@@ -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();