Commit e5c93108 authored by gabime's avatar gabime Committed by Victor Zverovich

Added clear() to basic_buffer

parent 60c662b3
...@@ -379,6 +379,11 @@ class basic_buffer { ...@@ -379,6 +379,11 @@ class basic_buffer {
size_ = new_size; size_ = new_size;
} }
/** Clears this buffer. */
void clear() {
size_ = 0;
}
/** Reserves space to store at least *capacity* elements. */ /** Reserves space to store at least *capacity* elements. */
void reserve(std::size_t new_capacity) { void reserve(std::size_t new_capacity) {
if (new_capacity > capacity_) if (new_capacity > capacity_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment