diff options
author | David Robillard <d@drobilla.net> | 2006-09-09 14:24:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-09 14:24:56 +0000 |
commit | fca95e5d454d37bd74b98f5bce35cfcbaee86c3f (patch) | |
tree | 97fcf6e8afaf4356d46a24236e9aa2451ab55698 /src/common/util | |
parent | b853b3dde1f7028dd275f78433a6ad9b5b9f61c7 (diff) | |
download | ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.tar.gz ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.tar.bz2 ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.zip |
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
Diffstat (limited to 'src/common/util')
-rw-r--r-- | src/common/util/CountedPtr.h | 6 | ||||
-rw-r--r-- | src/common/util/Queue.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/common/util/CountedPtr.h b/src/common/util/CountedPtr.h index 16eb0eee..c5eb2e50 100644 --- a/src/common/util/CountedPtr.h +++ b/src/common/util/CountedPtr.h @@ -87,13 +87,9 @@ public: // Fail if this is not a valid cast if (y) { -#ifdef WITH_RTTI T* const casted_y = dynamic_cast<T* const>(y._counter->ptr); -#else - T* const casted_y = static_cast<T* const>(y._counter->ptr); -#endif + if (casted_y) { - assert(casted_y == y._counter->ptr); //release(); // FIXME: leak? retain((Counter*)y._counter); assert(_counter == (Counter*)y._counter); 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<T>::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<T>::pop() { assert(!is_empty()); + assert(m_size > 0); T& r = m_objects[m_front]; m_front = (m_front + 1) % (m_size); |