X-Git-Url: https://git.auder.net/?p=cgds.git;a=blobdiff_plain;f=src%2FQueue.h;h=619ae4addce82ad8b3de5c9f8c1d260bde0ef3c9;hp=db715793ae8c8a70dc7614bed13e508070adbdb7;hb=012c97ddf103ecd983df2520f87ca0c31010f9f2;hpb=10b9967a8486514da0d3c534d9403c42d05527f0 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; /**