f17-improvement-consistency-performance #25

Merged
Mineplay merged 33 commits from f17-improvement-consistency-performance into main 2025-07-10 16:57:05 -05:00
2 changed files with 1 additions and 9 deletions
Showing only changes of commit 349268068b - Show all commits

View file

@ -39,12 +39,12 @@ FledastyError fledasty_stack_initialize(FledastyStack *new_stack, void *values,
FledastyError fledasty_stack_destroy(FledastyStack *current_stack); FledastyError fledasty_stack_destroy(FledastyStack *current_stack);
FledastyError fledasty_stack_push(FledastyStack *current_stack, void *value); FledastyError fledasty_stack_push(FledastyStack *current_stack, void *value);
void *fledasty_stack_peek(const FledastyStack *current_stack);
void *fledasty_stack_pop(FledastyStack *current_stack); void *fledasty_stack_pop(FledastyStack *current_stack);
FledastyError fledasty_stack_clear(FledastyStack *current_stack); FledastyError fledasty_stack_clear(FledastyStack *current_stack);
FledastyError fledasty_stack_shrink_to_fit(FledastyStack *current_stack); FledastyError fledasty_stack_shrink_to_fit(FledastyStack *current_stack);
static inline void *fledasty_stack_peek(const FledastyStack *current_stack) { (current_stack == NULL) ? NULL : current_stack->buffer + ((current_stack->size - 1) * current_stack->element_byte_size); }
static inline bool fledasty_stack_is_empty(const FledastyStack *current_stack) { return current_stack == NULL || current_stack->size == 0; } static inline bool fledasty_stack_is_empty(const FledastyStack *current_stack) { return current_stack == NULL || current_stack->size == 0; }
#endif #endif

View file

@ -90,14 +90,6 @@ FledastyError fledasty_stack_push(FledastyStack *current_stack, void *value) {
return FLEDASTY_ERROR_NONE; return FLEDASTY_ERROR_NONE;
} }
void *fledasty_stack_peek(const FledastyStack *current_stack) {
if (current_stack == NULL) {
return NULL;
}
return current_stack->buffer + ((current_stack->size - 1) * current_stack->element_byte_size);
}
void *fledasty_stack_pop(FledastyStack *current_stack) { void *fledasty_stack_pop(FledastyStack *current_stack) {
if (current_stack == NULL) { if (current_stack == NULL) {
return NULL; return NULL;