MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / removeDiscarded

Method removeDiscarded

src/Battlescape/PathfindingOpenSet.cpp:42–50  ·  view source on GitHub ↗

* Keeps removing all discarded entries that have come to the top of the queue. */

Source from the content-addressed store, hash-verified

40 * Keeps removing all discarded entries that have come to the top of the queue.
41 */
42void 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.

Callers

nothing calls this directly

Calls 3

topMethod · 0.80
popMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected