MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Pop

Method Pop

Source/Utils/micropather.cpp:113–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113PathNode* OpenQueue::Pop()
114{
115 MPASSERT( sentinel->next != sentinel );
116 PathNode* pNode = sentinel->next;
117 pNode->Unlink();
118#ifdef DEBUG
119 sentinel->CheckList();
120#endif
121
122 MPASSERT( pNode->inClosed == 0 );
123 MPASSERT( pNode->inOpen == 1 );
124 pNode->inOpen = 0;
125
126#ifdef DEBUG_PATH_DEEP
127 printf( "Open Pop: " );
128 graph->PrintStateInfo( pNode->state );
129 printf( " total=%.1f\n", pNode->totalCost );
130#endif
131
132 return pNode;
133}
134
135void OpenQueue::Update( PathNode* pNode )
136{

Callers 2

SolveMethod · 0.80
SolveForNearStatesMethod · 0.80

Calls 3

UnlinkMethod · 0.80
CheckListMethod · 0.80
PrintStateInfoMethod · 0.80

Tested by

no test coverage detected