X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=src%2FQueue.h;h=0cd97665b2ed0ad4cce98b3a1fa0296f68cb9190;hb=e49c086220aa729c1d9effd3f592422f292bd426;hp=db715793ae8c8a70dc7614bed13e508070adbdb7;hpb=a78687686f5b490d99fae21f9fa8aaa9a34f1812;p=cgds.git diff --git a/src/Queue.h b/src/Queue.h index db71579..0cd9766 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/List.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. + List* list; ///< Internal list representation } Queue; /**