diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cb0d29..90badd68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/detail/buffers_range_adaptor.hpp b/include/boost/beast/core/detail/buffers_range_adaptor.hpp index 2e04d14f..e8e51474 100644 --- a/include/boost/beast/core/detail/buffers_range_adaptor.hpp +++ b/include/boost/beast/core/detail/buffers_range_adaptor.hpp @@ -38,13 +38,9 @@ public: buffers_iterator_type; 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_)}; } };