forked from boostorg/beast
Refactor read_op + fail_op
This commit is contained in:
@@ -35,15 +35,6 @@ data() const ->
|
||||
return {in_, dist(in_, out_)};
|
||||
}
|
||||
|
||||
inline
|
||||
auto
|
||||
flat_static_buffer_base::
|
||||
mutable_data() ->
|
||||
mutable_data_type
|
||||
{
|
||||
return {in_, dist(in_, out_)};
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
flat_static_buffer_base::
|
||||
|
||||
@@ -50,27 +50,6 @@ data() const ->
|
||||
return result;
|
||||
}
|
||||
|
||||
inline
|
||||
auto
|
||||
static_buffer_base::
|
||||
mutable_data() ->
|
||||
mutable_data_type
|
||||
{
|
||||
using boost::asio::mutable_buffer;
|
||||
mutable_data_type result;
|
||||
if(in_off_ + in_size_ <= capacity_)
|
||||
{
|
||||
result[0] = mutable_buffer{begin_ + in_off_, in_size_};
|
||||
result[1] = mutable_buffer{begin_, 0};
|
||||
}
|
||||
else
|
||||
{
|
||||
result[0] = mutable_buffer{begin_ + in_off_, capacity_ - in_off_};
|
||||
result[1] = mutable_buffer{begin_, in_size_ - (capacity_ - in_off_)};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
inline
|
||||
auto
|
||||
static_buffer_base::
|
||||
|
||||
Reference in New Issue
Block a user