From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/pqueue.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/pqueue.cpp (limited to 'src/pqueue.cpp') diff --git a/src/pqueue.cpp b/src/pqueue.cpp deleted file mode 100644 index 1f0b8b5..0000000 --- a/src/pqueue.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "pqueue.h" - -PQueue::PQueue( int nNewNumQueues ) -{ - nNumQueues = nNewNumQueues; - aQueue = new Queue[nNumQueues]; -} - -PQueue::~PQueue() -{ - delete[] aQueue; -} - -void PQueue::enqueue( void *pData, int nQueueLevel ) -{ - if( nQueueLevel < 0 || nQueueLevel >= nNumQueues ) - return; - - aQueue[nQueueLevel].enqueue( pData ); -} - -void *PQueue::dequeue() -{ - for( int j = 0; j < nNumQueues; j++ ) - { - if( aQueue[j].isEmpty() == false ) - { - return aQueue[j].dequeue(); - } - } - - return NULL; -} -- cgit v1.2.3