util/WritableBuffer: add method skip_front()
This commit is contained in:
parent
07e58ae64f
commit
87e0459fcc
|
@ -217,6 +217,15 @@ struct WritableBuffer {
|
|||
pop_front();
|
||||
return result;
|
||||
}
|
||||
|
||||
void skip_front(size_type n) {
|
||||
#ifndef NDEBUG
|
||||
assert(size >= n);
|
||||
#endif
|
||||
|
||||
data += n;
|
||||
size -= n;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue