Appends an entry to the end of the queue, resizing if necessary. */
| 54 | |
| 55 | /* Appends an entry to the end of the queue, resizing if necessary. */ |
| 56 | void Queue_Enqueue(struct Queue* queue, void* item) { |
| 57 | if (queue->count == queue->capacity) |
| 58 | Queue_Resize(queue); |
| 59 | |
| 60 | //queue->entries[queue->tail] = item; |
| 61 | Mem_Copy(queue->entries + queue->tail * queue->structSize, item, queue->structSize); |
| 62 | queue->tail = (queue->tail + 1) & queue->mask; |
| 63 | queue->count++; |
| 64 | } |
| 65 | |
| 66 | /* Retrieves the entry from the front of the queue. */ |
| 67 | void* Queue_Dequeue(struct Queue* queue) { |
no test coverage detected