Tidy up buffers_range

This commit is contained in:
Vinnie Falco committed 2019-07-01 12:49:03 -07:00
1 parent ce1c6d3222
commit 9e0564044f
2 files changed
+5 -13

No files matched your search

+1
View File
@@ -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_)};
}
};