mirror of
https://github.com/monero-project/monero.git
synced 2025-05-21 14:00:26 -04:00
Add clear method to byte_stream
This commit is contained in:
parent
765db1ae7a
commit
b641e0a2c0
2 changed files with 44 additions and 0 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue