aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-26 13:31:45 +0200
committerMax Kellermann <max@duempel.org>2014-06-26 13:31:48 +0200
commit74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3 (patch)
tree7c8a6e3cf9a1fb2388a5ca6a16797442e63d72f9
parent7213c267983c37b24ae12f2d188e9ea1bf961b3b (diff)
downloadmpd-74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3.tar.gz
mpd-74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3.tar.xz
mpd-74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3.zip
util/ConstBuffer: wrap assert() in NDEBUG check
Fixes build failure because assert.h was not included.
Diffstat (limited to '')
-rw-r--r--src/util/ConstBuffer.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx
index db8e64df0..1ba4301c8 100644
--- a/src/util/ConstBuffer.hxx
+++ b/src/util/ConstBuffer.hxx
@@ -208,7 +208,9 @@ struct ConstBuffer {
* not actually modify the buffer). Buffer must not be empty.
*/
void pop_front() {
+#ifndef NDEBUG
assert(!IsEmpty());
+#endif
++data;
--size;
@@ -219,7 +221,9 @@ struct ConstBuffer {
* not actually modify the buffer). Buffer must not be empty.
*/
void pop_back() {
+#ifndef NDEBUG
assert(!IsEmpty());
+#endif
--size;
}