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

Method SetMapSchemeForCountriesWithAbsentDiffs

libs/storage/storage.cpp:1773–1787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1771}
1772
1773void Storage::SetMapSchemeForCountriesWithAbsentDiffs(IsDiffAbsentForCountry const & isAbsent)
1774{
1775 std::vector<CountryId> countriesToReplace;
1776 m_downloader->GetQueue().ForEachCountry([&countriesToReplace, &isAbsent](QueuedCountry const & queuedCountry)
1777 {
1778 if (queuedCountry.GetFileType() == MapFileType::Diff && isAbsent(queuedCountry.GetCountryId()))
1779 countriesToReplace.push_back(queuedCountry.GetCountryId());
1780 });
1781
1782 for (auto const & countryId : countriesToReplace)
1783 {
1784 DeleteCountryFilesFromDownloader(countryId);
1785 DownloadCountry(countryId, MapFileType::Map);
1786 }
1787}
1788
1789void Storage::AbortDiffScheme()
1790{

Callers

nothing calls this directly

Calls 5

GetCountryIdMethod · 0.80
ForEachCountryMethod · 0.45
GetQueueMethod · 0.45
GetFileTypeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected