aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/byte_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/include/byte_stream.h')
-rw-r--r--contrib/epee/include/byte_stream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/epee/include/byte_stream.h b/contrib/epee/include/byte_stream.h
index 98f563ca9..42a9e1dd9 100644
--- a/contrib/epee/include/byte_stream.h
+++ b/contrib/epee/include/byte_stream.h
@@ -117,6 +117,9 @@ namespace epee
check(more);
}
+ //! Reset write position, but do not release internal memory. \post `size() == 0`.
+ void clear() noexcept { next_write_ = buffer_.get(); }
+
/*! Copy `length` bytes starting at `ptr` to end of stream.
\throw std::range_error If exceeding max size_t value.
\throw std::bad_alloc If allocation fails. */