X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=src%2FQueue.h;h=619ae4addce82ad8b3de5c9f8c1d260bde0ef3c9;hb=012c97ddf103ecd983df2520f87ca0c31010f9f2;hp=db715793ae8c8a70dc7614bed13e508070adbdb7;hpb=a78687686f5b490d99fae21f9fa8aaa9a34f1812;p=cgds.git diff --git a/src/Queue.h b/src/Queue.h index db71579..619ae4a 100644 --- a/src/Queue.h +++ b/src/Queue.h @@ -9,24 +9,15 @@ #include #include "cgds/types.h" #include "cgds/safe_alloc.h" - -/** - * @brief Generic internal queue cell. - */ -typedef struct QueueCell { - void* data; ///< Generic data contained in the cell. - struct QueueCell* next; ///< Next cell in the internal single-linked list. -} QueueCell; +#include "cgds/Vector.h" /** * @brief Queue containing generic data. * @param dataSize Size in bytes of a queue element. */ typedef struct Queue { - UInt size; ///< Count elements in the queue. size_t dataSize; ///< Size in bytes of a queue element. - QueueCell* front; ///< Pointer to the next dequeued element. - QueueCell* back; ///< Pointer to the last enqueued element. + Vector* array; ///< Internal vector representation } Queue; /**