Added clear() to basic_buffer
This commit is contained in:
1 parent
60c662b3a7
commit
e5c93108e6
1 file changed
+5
@@ -379,6 +379,11 @@ class basic_buffer {
|
||||
size_ = new_size;
|
||||
}
|
||||
|
||||
/** Clears this buffer. */
|
||||
void clear() {
|
||||
size_ = 0;
|
||||
}
|
||||
|
||||
/** Reserves space to store at least *capacity* elements. */
|
||||
void reserve(std::size_t new_capacity) {
|
||||
if (new_capacity > capacity_)
|
||||
|
||||
Reference in new issue
Block a user