more use of emplace_back in chained_buffer
This commit is contained in:
parent
80f5edc500
commit
448de4ca14
|
@ -137,11 +137,11 @@ namespace libtorrent {
|
||||||
if (i->used_size > bytes)
|
if (i->used_size > bytes)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(bytes > 0);
|
TORRENT_ASSERT(bytes > 0);
|
||||||
vec.push_back(Buffer(i->buf, std::size_t(bytes)));
|
vec.emplace_back(i->buf, std::size_t(bytes));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TORRENT_ASSERT(i->used_size > 0);
|
TORRENT_ASSERT(i->used_size > 0);
|
||||||
vec.push_back(Buffer(i->buf, std::size_t(i->used_size)));
|
vec.emplace_back(i->buf, std::size_t(i->used_size));
|
||||||
bytes -= i->used_size;
|
bytes -= i->used_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue