From 74a46788cdbbcb97e498b2ee0b4ccc2abbf1eba3 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 26 Jun 2014 13:31:45 +0200
Subject: [PATCH] util/ConstBuffer: wrap assert() in NDEBUG check

Fixes build failure because assert.h was not included.
---
 src/util/ConstBuffer.hxx | 4 ++++
 1 file changed, 4 insertions(+)

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;
 	}