Tidy up read_size_helper and dynamic buffers

fix #376
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:17 -07:00
1 parent 3543b4b913
commit 929174d4d8
15 files changed
+105 -46

No files matched your search

+2
View File
@@ -15,6 +15,7 @@
#include <beast/core/bind_handler.hpp>
#include <beast/core/handler_ptr.hpp>
#include <beast/core/type_traits.hpp>
#include <beast/core/detail/read_size_helper.hpp>
#include <boost/asio/handler_alloc_hook.hpp>
#include <boost/asio/handler_continuation_hook.hpp>
#include <boost/asio/handler_invoke_hook.hpp>
@@ -160,6 +161,7 @@ operator()(error_code ec,
case 2:
case 3:
{
using beast::detail::read_size_helper;
auto const size =
read_size_helper(d.db, 65536);
BOOST_ASSERT(size > 0);
+2
View File
@@ -15,6 +15,7 @@
#include <beast/core/bind_handler.hpp>
#include <beast/core/handler_ptr.hpp>
#include <beast/core/type_traits.hpp>
#include <beast/core/detail/read_size_helper.hpp>
#include <boost/asio/handler_alloc_hook.hpp>
#include <boost/asio/handler_continuation_hook.hpp>
#include <boost/asio/handler_invoke_hook.hpp>
@@ -53,6 +54,7 @@ read_some_buffer(
do_read:
boost::optional<typename
DynamicBuffer::mutable_buffers_type> mb;
using beast::detail::read_size_helper;
auto const size =
read_size_helper(buffer, 65536);
BOOST_ASSERT(size > 0);