util/ConstBuffer: add method skip_front()

This commit is contained in:
Max Kellermann 2014-06-26 13:29:51 +02:00
parent 74a46788cd
commit 211aea1441
1 changed files with 9 additions and 0 deletions

View File

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