util/WritableBuffer: add method skip_front()

This commit is contained in:
Max Kellermann 2016-08-16 08:46:30 +02:00
parent 07e58ae64f
commit 87e0459fcc
1 changed files with 9 additions and 0 deletions

View File

@ -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