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

Method OnDiffStatusReceived

libs/storage/storage.cpp:1847–1867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1845}
1846
1847void Storage::OnDiffStatusReceived(diffs::NameDiffInfoMap && diffs)
1848{
1849 m_diffsDataSource->SetDiffInfo(std::move(diffs));
1850
1851 SetMapSchemeForCountriesWithAbsentDiffs([this](auto const & id) { return !m_diffsDataSource->HasDiffFor(id); });
1852
1853 if (m_diffsDataSource->GetStatus() == diffs::Status::NotAvailable)
1854 return;
1855
1856 for (auto const & localDiff : m_notAppliedDiffs)
1857 {
1858 auto const countryId = FindCountryIdByFile(localDiff.GetCountryName());
1859
1860 if (m_diffsDataSource->HasDiffFor(countryId))
1861 UpdateNode(countryId);
1862 else
1863 localDiff.DeleteFromDisk(MapFileType::Diff);
1864 }
1865
1866 m_notAppliedDiffs.clear();
1867}
1868
1869StatusAndError Storage::GetNodeStatusInfo(CountryTree::Node const & node,
1870 vector<pair<CountryId, NodeStatus>> & disputedTerritories,

Callers

nothing calls this directly

Calls 6

SetDiffInfoMethod · 0.80
HasDiffForMethod · 0.80
GetStatusMethod · 0.45
GetCountryNameMethod · 0.45
DeleteFromDiskMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected