diff --git a/include/ircd/buffer/buffer_base.h b/include/ircd/buffer/buffer_base.h index 416b12db1..97d800a01 100644 --- a/include/ircd/buffer/buffer_base.h +++ b/include/ircd/buffer/buffer_base.h @@ -55,13 +55,6 @@ ircd::buffer::buffer::buffer(const it &start, :buffer{start, start + size} {} -template -inline __attribute__((always_inline, flatten)) -ircd::buffer::buffer::buffer(const it &start, - const it &stop) -:std::pair{start, stop} -{} - template inline __attribute__((always_inline)) ircd::buffer::buffer::buffer(const buffer &start, @@ -73,7 +66,16 @@ ircd::buffer::buffer::buffer(const buffer &start, {} template -inline __attribute__((always_inline, flatten)) +inline __attribute__((always_inline)) +ircd::buffer::buffer::buffer(const it &start, + const it &stop) +:std::pair{start, stop} +{ + //assert(this->begin() <= this->end()); +} + +template +inline __attribute__((always_inline)) ircd::buffer::buffer::operator string_view() const { diff --git a/include/ircd/buffer/window_buffer.h b/include/ircd/buffer/window_buffer.h index b97784077..7c18e63d3 100644 --- a/include/ircd/buffer/window_buffer.h +++ b/include/ircd/buffer/window_buffer.h @@ -102,7 +102,9 @@ ircd::buffer::window_buffer::operator()(const closure_cbuf &closure) inline ircd::buffer::const_buffer ircd::buffer::window_buffer::operator()(const closure &closure) { - consume(*this, closure(*this)); + const size_t addl(closure(*this)); + assert(addl <= remaining()); + consume(*this, addl); return completed(); }