MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / SetCacheStrategy

Function SetCacheStrategy

src/External/CascLib/src/CascOpenFile.cpp:282–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282bool SetCacheStrategy(HANDLE hFile, CSTRTG CacheStrategy)
283{
284 TCascFile * hf;
285
286 // Validate the file handle
287 if((hf = TCascFile::IsValid(hFile)) != NULL)
288 {
289 // The cache must not be initialized yet
290 if(hf->pbFileCache == NULL)
291 {
292 hf->CacheStrategy = CacheStrategy;
293 return true;
294 }
295 }
296
297 // Failed. This should never happen
298 assert(false);
299 return false;
300}
301
302//-----------------------------------------------------------------------------
303// Public functions

Callers 1

LoadInternalFileToMemoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected