Rename to buffer_bytes

This commit is contained in:
Vinnie Falco committed 2019-03-05 11:09:53 -08:00
1 parent 6ccdcdf51d
commit 9f2b0ce1db
62 files changed
+206 -258

No files matched your search

@@ -401,7 +401,7 @@ buffers_adaptor(MutableBufferSequence const& bs)
, max_size_(
[&bs]
{
return buffer_size(bs);
return buffer_bytes(bs);
}())
{
}
@@ -418,7 +418,7 @@ buffers_adaptor(
, max_size_(
[&]
{
return buffer_size(bs_);
return buffer_bytes(bs_);
}())
{
}
@@ -501,14 +501,14 @@ prepare(std::size_t n) ->
end_ = out_;
if(end_ != net::buffer_sequence_end(bs_))
{
auto size = buffer_size(*end_) - out_pos_;
auto size = buffer_bytes(*end_) - out_pos_;
if(n > size)
{
n -= size;
while(++end_ !=
net::buffer_sequence_end(bs_))
{
size = buffer_size(*end_);
size = buffer_bytes(*end_);
if(n < size)
{
out_end_ = n;
@@ -544,7 +544,7 @@ commit(std::size_t n) noexcept
while(out_ != last)
{
auto const avail =
buffer_size(*out_) - out_pos_;
buffer_bytes(*out_) - out_pos_;
if(n < avail)
{
out_pos_ += n;
@@ -561,7 +561,7 @@ commit(std::size_t n) noexcept
n, out_end_ - out_pos_);
out_pos_ += n;
in_size_ += n;
if(out_pos_ == buffer_size(*out_))
if(out_pos_ == buffer_bytes(*out_))
{
++out_;
out_pos_ = 0;
@@ -577,7 +577,7 @@ consume(std::size_t n) noexcept
while(begin_ != out_)
{
auto const avail =
buffer_size(*begin_) - in_pos_;
buffer_bytes(*begin_) - in_pos_;
if(n < avail)
{
in_size_ -= n;
@@ -150,7 +150,7 @@ setup(std::size_t size)
auto const last = bs_.end();
while(end_ != last)
{
auto const len = buffer_size(*end_++);
auto const len = buffer_bytes(*end_++);
if(len >= size)
{
size_ += size;
@@ -282,12 +282,6 @@ public:
std::forward<Args>(args)...))
{
}
std::size_t
buffer_size_impl() const noexcept
{
return this->size();
}
};
//------------------------------------------------------------------------------
@@ -324,12 +318,6 @@ public:
std::forward<Args>(args)...))
{
}
std::size_t
buffer_size_impl() const noexcept
{
return this->size();
}
};
} // beast
@@ -208,7 +208,7 @@ consume(std::size_t amount)
for(;amount > 0 && begin_ != end; ++begin_)
{
auto const len =
buffer_size(*begin_) - skip_;
buffer_bytes(*begin_) - skip_;
if(amount < len)
{
skip_ += amount;
@@ -196,7 +196,7 @@ public:
const_iterator end() const noexcept;
std::size_t
buffer_size() const noexcept
buffer_bytes() const noexcept
{
return b_->size();
}
@@ -1242,7 +1242,7 @@ basic_multi_buffer<Allocator>::
debug_check() const
{
#ifndef NDEBUG
BOOST_ASSERT(buffer_size(data()) == in_size_);
BOOST_ASSERT(buffer_bytes(data()) == in_size_);
if(list_.empty())
{
BOOST_ASSERT(in_pos_ == 0);