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

Method GetLatestLocalFile

libs/storage/storage.cpp:713–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713LocalFilePtr Storage::GetLatestLocalFile(CountryFile const & countryFile) const
714{
715 CHECK_THREAD_CHECKER(m_threadChecker, ());
716
717 CountryId const & countryId = FindCountryIdByFile(countryFile.GetName());
718 if (IsLeaf(countryId))
719 {
720 LocalFilePtr localFile = GetLatestLocalFile(countryId);
721 if (localFile)
722 return localFile;
723 }
724
725 auto const it = m_localFilesForFakeCountries.find(countryFile);
726 if (it != m_localFilesForFakeCountries.end())
727 return it->second;
728
729 return LocalFilePtr();
730}
731
732LocalFilePtr Storage::GetLatestLocalFile(CountryId const & countryId) const
733{

Callers 5

TrackMatcherMethod · 0.80
CmdTagsTableFunction · 0.80
UNIT_CLASS_TESTFunction · 0.80
UNIT_TESTFunction · 0.80
UNIT_CLASS_TESTFunction · 0.80

Calls 6

frontMethod · 0.80
GetNameMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
GetVersionMethod · 0.45

Tested by 3

UNIT_CLASS_TESTFunction · 0.64
UNIT_TESTFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64