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

Method PushCache

Source/Utils/micropather.cpp:252–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250
251
252bool 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
266void PathNodePool::GetCache( int start, int nNodes, NodeCost* nodes ) {

Callers 1

GetNodeNeighborsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected