diff options
author | Hampus <hampus@hampusmat.com> | 2022-01-04 18:55:51 +0100 |
---|---|---|
committer | Hampus <hampus@hampusmat.com> | 2022-01-05 20:09:27 +0100 |
commit | e3690eb85a9456cc1f3ccda751ae7d9fdf2d3b03 (patch) | |
tree | 2fdd32726d753495bf562102a0531101eaa1ddfd /src/position_stack.h | |
parent | 1bed3ac57906b26ef05b25c2bc5c1dca424dba4a (diff) |
refactor: improve even more
Diffstat (limited to 'src/position_stack.h')
-rw-r--r-- | src/position_stack.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/position_stack.h b/src/position_stack.h index 83fb98c..674da23 100644 --- a/src/position_stack.h +++ b/src/position_stack.h @@ -1,23 +1,19 @@ #ifndef POSITION_STACK_H #define POSITION_STACK_H +#include "position.h" + #define STACK_ERR_OVERFLOW 0xFFF01 #define STACK_ERR_UNDERFLOW 0xFFF02 -typedef struct Position -{ - int x; - int y; -} Position; - typedef struct PositionStack { - int capacity; + unsigned int capacity; int top; Position *items; } PositionStack; -PositionStack *pos_stack_create(int capacity); +PositionStack *pos_stack_create(unsigned int capacity); void pos_stack_destroy(PositionStack *pos_stack); |