diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:00:44 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:00:44 +0300 |
| commit | d9d29ab80ddc33e864bf9caf36db524bbd3a0d25 (patch) | |
| tree | 26c635b7bde4a47bdebb4edb3486b5050c34c549 /stack.c | |
| parent | 1729beeae70832ef89f8077eff5a225ba51e337b (diff) | |
| download | astar-d9d29ab80ddc33e864bf9caf36db524bbd3a0d25.tar.xz | |
Fix return type for ps_push()
Diffstat (limited to 'stack.c')
| -rw-r--r-- | stack.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -12,14 +12,13 @@ PositionStack ps_new(void) { return ps; } -int ps_push(PositionStack *ps, Position pos) { +void ps_push(PositionStack *ps, Position pos) { if (ps->top >= ps->capacity) { ps->capacity *= STACK_SIZE_COEFFICIENT; if ((ps->arr = realloc(ps->arr, sizeof(Position) * ps->capacity)) == NULL) error("Failed to realloc ps->arr\n"); } ps->arr[ps->top] = pos; ps->top += 1; - return 0; } Position ps_pop(PositionStack *ps) { |
