MCPcopy Create free account
hub / github.com/crawl/crawl / _load_map_cache

Function _load_map_cache

crawl-ref/source/maps.cc:1389–1408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1387}
1388
1389static bool _load_map_cache(const string &filename, const string &cachename)
1390{
1391 _check_des_index_dir();
1392 if (!crawl_state.use_des_cache)
1393 return false;
1394
1395 const string descache_base = get_descache_path(cachename, "");
1396
1397 file_lock deslock(descache_base + ".lk", "rb", false);
1398
1399 // What's the point in checking these twice (here and in load_ma_index)?
1400 time_t mtime = file_modtime(filename);
1401 if (!_verify_map_index(descache_base, mtime)
1402 || !_verify_map_full(descache_base, mtime))
1403 {
1404 return false;
1405 }
1406
1407 return _load_map_index(cachename, descache_base, mtime);
1408}
1409
1410static void _write_map_prelude(const string &filebase, time_t mtime)
1411{

Callers 1

_parse_mapsFunction · 0.85

Calls 6

_check_des_index_dirFunction · 0.85
get_descache_pathFunction · 0.85
file_modtimeFunction · 0.85
_verify_map_indexFunction · 0.85
_verify_map_fullFunction · 0.85
_load_map_indexFunction · 0.85

Tested by

no test coverage detected