| 111 | } |
| 112 | |
| 113 | PathNode* 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 | |
| 135 | void OpenQueue::Update( PathNode* pNode ) |
| 136 | { |
no test coverage detected