util/ConstBuffer: add method skip_front()
This commit is contained in:
parent
74a46788cd
commit
211aea1441
|
@ -237,6 +237,15 @@ struct ConstBuffer {
|
|||
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