mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Tidy up buffers_range
This commit is contained in:
@@ -6,6 +6,7 @@ Version 261:
|
||||
* Simplify websocket::detail::prng
|
||||
* Don't over-allocate in http::basic_fields
|
||||
* Fix multi_buffer allocation alignment
|
||||
* Tidy up buffers_range
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -38,13 +38,9 @@ public:
|
||||
buffers_iterator_type<BufferSequence>;
|
||||
|
||||
iter_type it_{};
|
||||
buffers_range_adaptor const* b_ = nullptr;
|
||||
|
||||
const_iterator(
|
||||
buffers_range_adaptor const& b,
|
||||
iter_type const& it)
|
||||
const_iterator(iter_type const& it)
|
||||
: it_(it)
|
||||
, b_(&b)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,7 +58,7 @@ public:
|
||||
bool
|
||||
operator==(const_iterator const& other) const
|
||||
{
|
||||
return b_ == other.b_ && it_ == other.it_;
|
||||
return it_ == other.it_;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -111,11 +107,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
buffers_range_adaptor(
|
||||
buffers_range_adaptor const&) = default;
|
||||
buffers_range_adaptor& operator=(
|
||||
buffers_range_adaptor const&) = default;
|
||||
|
||||
explicit
|
||||
buffers_range_adaptor(BufferSequence const& b)
|
||||
: b_(b)
|
||||
@@ -125,13 +116,13 @@ public:
|
||||
const_iterator
|
||||
begin() const noexcept
|
||||
{
|
||||
return {*this, net::buffer_sequence_begin(b_)};
|
||||
return {net::buffer_sequence_begin(b_)};
|
||||
}
|
||||
|
||||
const_iterator
|
||||
end() const noexcept
|
||||
{
|
||||
return {*this, net::buffer_sequence_end(b_)};
|
||||
return {net::buffer_sequence_end(b_)};
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user