projects
/
cgds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo + cosmetics
[cgds.git]
/
src
/
Queue.h
diff --git
a/src/Queue.h
b/src/Queue.h
index
db71579
..
0cd9766
100644
(file)
--- a/
src/Queue.h
+++ b/
src/Queue.h
@@
-9,24
+9,15
@@
#include <string.h>
#include "cgds/types.h"
#include "cgds/safe_alloc.h"
#include <string.h>
#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 {
/**
* @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.
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;
/**
} Queue;
/**