There was an error while loading. Please reload this page.
1 parent d22bb50 commit 5d3dc21Copy full SHA for 5d3dc21
1 file changed
src/torrent.cpp
@@ -7343,6 +7343,8 @@ namespace {
7343
void torrent::get_peer_info(std::vector<peer_info>* v)
7344
{
7345
v->clear();
7346
+ v->reserve(m_connections.size());
7347
+
7348
for (auto const peer : *this)
7349
7350
TORRENT_ASSERT(peer->m_in_use == 1337);
@@ -7373,6 +7375,7 @@ namespace {
7373
7375
, span<piece_picker::downloading_piece const> q
7374
7376
, std::vector<partial_piece_info>* queue)
7377
7378
+ queue->reserve(static_cast<std::size_t>(q.size()));
7379
const int blocks_per_piece = p.blocks_in_piece(piece_index_t(0));
7380
int counter = 0;
7381
for (auto i = q.begin(); i != q.end(); ++i, ++counter)
0 commit comments