MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DetectScriptFileChanged

Method DetectScriptFileChanged

Source/Scripting/scriptfile.cpp:365–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365bool ScriptFileUtil::DetectScriptFileChanged(const Path& path) {
366 ScriptFileMap& file_map = ScriptFileCache::Instance()->files;
367 ScriptFileMap::iterator iter;
368 iter = file_map.find(path.GetFullPathStr());
369 if (iter == file_map.end()) {
370 return true;
371 } else {
372 ScriptFile& file = (*iter).second;
373 return GetLatestModification(path) > file.latest_modification;
374 }
375}
376
377int64_t ScriptFileUtil::GetLatestModification(const Path& path) {
378 PROFILER_ZONE(g_profiler_ctx, "GetLatestModification");

Callers

nothing calls this directly

Calls 3

GetFullPathStrMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected