diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-03-26 23:21:21 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-03-26 23:21:21 +0300 |
| commit | a3b039308419953225fe6ac34b07bd07ce78bbc5 (patch) | |
| tree | d7b8361e203f0572da2fe3d774f05a3252012847 /priority_queue.h | |
| parent | b29c8bec16196b2e31a909e28c38cc8137f0760b (diff) | |
| download | astar-a3b039308419953225fe6ac34b07bd07ce78bbc5.tar.xz | |
Remove *prev from PositionPQ
Diffstat (limited to 'priority_queue.h')
| -rw-r--r-- | priority_queue.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/priority_queue.h b/priority_queue.h index 13eea1a..c121487 100644 --- a/priority_queue.h +++ b/priority_queue.h @@ -3,13 +3,11 @@ #include "structs.h" -/* This is basically a sorted linked list - * Not sure if we need *prev, to be fair - * UPDATE: we do need *prev. */ +/* This is basically a sorted linked list + * Pro tip: if you always use the same priority, this becomes a regular queue */ struct PositionPQNode_s { Position pos; size_t priority; /* Lower is "better" */ - struct PositionPQNode_s *prev; struct PositionPQNode_s *next; }; |
