Use make_unique_noinit

fix #605
This commit is contained in:
Vinnie Falco
2017-07-20 08:15:30 -07:00
parent f34d4f7204
commit 69b61656dd
5 changed files with 14 additions and 5 deletions
+2 -1
View File
@@ -15,6 +15,7 @@
#include <beast/http/error.hpp>
#include <beast/http/rfc7230.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/make_unique.hpp>
#include <algorithm>
#include <utility>
@@ -120,7 +121,7 @@ put(ConstBufferSequence const& buffers,
if(size > buf_len_)
{
// reallocate
buf_.reset(new char[size]);
buf_ = boost::make_unique_noinit<char[]>(size);
buf_len_ = size;
}
// flatten