aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/ConstBuffer.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-26 13:29:51 +0200
committerMax Kellermann <max@duempel.org>2014-06-26 22:25:03 +0200
commit211aea1441bcb7cf79f2b143fbed9d8f641c13ef (patch)
tree6522b42ae7b9f277b9df2967f32e32f1c7290caf /src/util/ConstBuffer.hxx
parent74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3 (diff)
downloadmpd-211aea1441bcb7cf79f2b143fbed9d8f641c13ef.tar.gz
mpd-211aea1441bcb7cf79f2b143fbed9d8f641c13ef.tar.xz
mpd-211aea1441bcb7cf79f2b143fbed9d8f641c13ef.zip
util/ConstBuffer: add method skip_front()
Diffstat (limited to '')
-rw-r--r--src/util/ConstBuffer.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx
index 1ba4301c8..4d0a49e98 100644
--- a/src/util/ConstBuffer.hxx
+++ b/src/util/ConstBuffer.hxx
@@ -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