| 396 | |
| 397 | |
| 398 | void PathNodePool::AddPathNode( unsigned key, PathNode* root ) |
| 399 | { |
| 400 | if ( hashTable[key] ) { |
| 401 | PathNode* p = hashTable[key]; |
| 402 | while( true ) { |
| 403 | int dir = (root->state < p->state) ? 0 : 1; |
| 404 | if ( p->child[dir] ) { |
| 405 | p = p->child[dir]; |
| 406 | } |
| 407 | else { |
| 408 | p->child[dir] = root; |
| 409 | break; |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | else { |
| 414 | hashTable[key] = root; |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | |
| 419 | PathNode* PathNodePool::FetchPathNode( cPosition state ) |
nothing calls this directly
no outgoing calls
no test coverage detected