From 448de4ca149b3a0891410e60195f876725e8fed7 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Sat, 3 Mar 2018 09:32:14 -0500 Subject: [PATCH] more use of emplace_back in chained_buffer --- src/chained_buffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chained_buffer.cpp b/src/chained_buffer.cpp index e96ea756d..0edec88d2 100644 --- a/src/chained_buffer.cpp +++ b/src/chained_buffer.cpp @@ -137,11 +137,11 @@ namespace libtorrent { if (i->used_size > bytes) { TORRENT_ASSERT(bytes > 0); - vec.push_back(Buffer(i->buf, std::size_t(bytes))); + vec.emplace_back(i->buf, std::size_t(bytes)); break; } 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; } }