MCPcopy Create free account
hub / github.com/comaps/comaps / DeleteAllLocalMaps

Method DeleteAllLocalMaps

libs/storage/storage.cpp:480–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480void Storage::DeleteAllLocalMaps(CountriesVec * existedCountries /* = nullptr */)
481{
482 CHECK_THREAD_CHECKER(m_threadChecker, ());
483
484 for (auto const & localFiles : m_localFiles)
485 {
486 for (auto const & localFile : localFiles.second)
487 {
488 LOG_SHORT(LINFO, ("Remove:", localFiles.first, DebugPrint(*localFile)));
489 if (existedCountries)
490 existedCountries->push_back(localFiles.first);
491 localFile->SyncWithDisk();
492 DeleteFromDiskWithIndexes(*localFile, MapFileType::Map);
493 DeleteFromDiskWithIndexes(*localFile, MapFileType::Diff);
494 }
495 }
496}
497
498bool Storage::HaveDownloadedCountries() const
499{

Callers

nothing calls this directly

Calls 4

SyncWithDiskMethod · 0.80
DebugPrintFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected