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

Method HasUnsavedEdits

libs/map/framework.cpp:506–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506bool Framework::HasUnsavedEdits(storage::CountryId const & countryId)
507{
508 bool hasUnsavedChanges = false;
509 auto const forEachInSubtree = [&hasUnsavedChanges, this](storage::CountryId const & fileName, bool groupNode)
510 {
511 if (groupNode)
512 return;
513 hasUnsavedChanges |= osm::Editor::Instance().HaveMapEditsToUpload(
514 m_featuresFetcher.GetDataSource().GetMwmIdByCountryFile(platform::CountryFile(fileName)));
515 };
516 GetStorage().ForEachInSubtree(countryId, forEachInSubtree);
517 return hasUnsavedChanges;
518}
519
520// Small copy-paste with LoadMapsAsync, but I don't have a better solution.
521void Framework::LoadMapsSync()

Calls 5

HaveMapEditsToUploadMethod · 0.80
GetMwmIdByCountryFileMethod · 0.80
GetDataSourceMethod · 0.80
CountryFileClass · 0.50
ForEachInSubtreeMethod · 0.45

Tested by

no test coverage detected