* Keeps removing all discarded entries that have come to the top of the queue. */
| 40 | * Keeps removing all discarded entries that have come to the top of the queue. |
| 41 | */ |
| 42 | void PathfindingOpenSet::removeDiscarded() |
| 43 | { |
| 44 | while (!_queue.empty() && !_queue.top()->_node) |
| 45 | { |
| 46 | OpenSetEntry *entry = _queue.top(); |
| 47 | _queue.pop(); |
| 48 | delete entry; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Gets the node with the least cost. |