From fca95e5d454d37bd74b98f5bce35cfcbaee86c3f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Sep 2006 14:24:56 +0000 Subject: Drove 'er home! Working monolothic Ingenuity (ie. in-process engine). Countless bugfixes. git-svn-id: http://svn.drobilla.net/lad/ingen@123 a436a847-0d15-0410-975c-d299462d15a1 --- src/common/util/Queue.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/util/Queue.h') diff --git a/src/common/util/Queue.h b/src/common/util/Queue.h index 10c7f0f5..a4c34222 100644 --- a/src/common/util/Queue.h +++ b/src/common/util/Queue.h @@ -66,6 +66,7 @@ Queue::Queue(size_t size) m_size(size+1), m_objects((T*)calloc(m_size, sizeof(T))) { + assert(size > 1); } @@ -147,6 +148,7 @@ inline T& Queue::pop() { assert(!is_empty()); + assert(m_size > 0); T& r = m_objects[m_front]; m_front = (m_front + 1) % (m_size); -- cgit v1.2.1