diff --git a/Source/Core/Common/Src/FixedSizeQueue.h b/Source/Core/Common/Src/FixedSizeQueue.h index cdfad71349..caeb57ecf4 100644 --- a/Source/Core/Common/Src/FixedSizeQueue.h +++ b/Source/Core/Common/Src/FixedSizeQueue.h @@ -39,9 +39,8 @@ class FixedSizeQueue public: FixedSizeQueue() { - head = 0; - tail = 0; storage = new T[N]; + clear(); } ~FixedSizeQueue() @@ -49,6 +48,12 @@ public: delete [] storage; } + void clear() { + head = 0; + tail = 0; + count = 0; + } + void push(T t) { storage[tail] = t; tail++;