| 250 | |
| 251 | |
| 252 | bool PathNodePool::PushCache( const NodeCost* nodes, int nNodes, int* start ) { |
| 253 | *start = -1; |
| 254 | if ( nNodes+cacheSize <= cacheCap ) { |
| 255 | for( int i=0; i<nNodes; ++i ) { |
| 256 | cache[i+cacheSize] = nodes[i]; |
| 257 | } |
| 258 | *start = cacheSize; |
| 259 | cacheSize += nNodes; |
| 260 | return true; |
| 261 | } |
| 262 | return false; |
| 263 | } |
| 264 | |
| 265 | |
| 266 | void PathNodePool::GetCache( int start, int nNodes, NodeCost* nodes ) { |