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