diff --git a/Include/Fledasty/Core/Stack.h b/Include/Fledasty/Core/Stack.h new file mode 100644 index 0000000..e69de29 diff --git a/Src/Core/Queue.c b/Src/Core/Queue.c index 1711c8d..e076b46 100644 --- a/Src/Core/Queue.c +++ b/Src/Core/Queue.c @@ -25,7 +25,6 @@ #include #include #include -#include FledastyError fledasty_queue_initialize(FledastyQueue *new_queue, const size_t element_byte_size) { if (new_queue == NULL) { @@ -60,7 +59,7 @@ FledastyError fledasty_queue_destroy(FledastyQueue *current_queue) { current_queue->buffer = NULL; return FLEDASTY_ERROR_NONE; } -#include + FledastyError fledasty_queue_push(FledastyQueue *current_queue, void *value) { if (current_queue == NULL || value == NULL) { return FLEDASTY_ERROR_INVALID_POINTER; @@ -73,7 +72,7 @@ FledastyError fledasty_queue_push(FledastyQueue *current_queue, void *value) { if (current_queue->buffer == NULL) { return FLEDASTY_ERROR_FAILED_ALLOCATION; } - printf("Allocated\n"); + size_t new_head = current_queue->capacity - current_queue->head; hallocy_move_memory(current_queue->buffer + (current_queue->head * current_queue->element_byte_size), current_queue->buffer + (new_head * current_queue->element_byte_size), current_queue->size - current_queue->tail); current_queue->head = new_head; @@ -84,7 +83,6 @@ FledastyError fledasty_queue_push(FledastyQueue *current_queue, void *value) { current_queue->size += 1; current_queue->tail += 1; if (current_queue->tail >= current_queue->capacity) { - printf("To 0\n"); current_queue->tail = 0; } diff --git a/Src/Core/Stack.c b/Src/Core/Stack.c new file mode 100644 index 0000000..e69de29