diff --git a/storage/diff_scheme/diff_manager.hpp b/storage/diff_scheme/diff_manager.hpp index d383635730..407b251c35 100644 --- a/storage/diff_scheme/diff_manager.hpp +++ b/storage/diff_scheme/diff_manager.hpp @@ -44,14 +44,14 @@ public: // If the diff is available, sets |size| to its size and returns true. // Otherwise, returns false. - bool SizeFor(storage::TCountryId const & countryId, uint64_t & size) const; + bool SizeFor(storage::CountryId const & countryId, uint64_t & size) const; // Sets |size| to how many bytes are left for the diff to be downloaded for |countryId| // or 0 if there is no diff available or it has already been downloaded. // This method may overestimate because it does not account for the possibility // of resuming an old download, i.e. the return value is either 0 or the diff size. // Returns true iff the diff is available. - bool SizeToDownloadFor(storage::TCountryId const & countryId, uint64_t & size) const; + bool SizeToDownloadFor(storage::CountryId const & countryId, uint64_t & size) const; bool VersionFor(storage::CountryId const & countryId, uint64_t & version) const; bool IsPossibleToAutoupdate() const; diff --git a/storage/storage.cpp b/storage/storage.cpp index 2113387946..061515df24 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -590,6 +590,7 @@ void Storage::DeleteCustomCountryVersion(LocalCountryFile const & localFile) } } + CountryId const countryId = FindCountryIdByFile(countryFile.GetName()); if (!IsLeaf(countryId)) { LOG(LERROR, ("Removed files for an unknown country:", localFile)); @@ -1404,7 +1405,7 @@ void Storage::GetChildrenInGroups(CountryId const & parent, CountriesVec & downl // All disputed territories in subtree with root == |parent|. CountriesVec allDisputedTerritories; parentNode->ForEachChild([&](CountryTreeNode const & childNode) { - vector> disputedTerritoriesAndStatus; + vector> disputedTerritoriesAndStatus; StatusAndError const childStatus = GetNodeStatusInfo(childNode, disputedTerritoriesAndStatus, true /* isDisputedTerritoriesCounted */); @@ -1679,7 +1680,7 @@ void Storage::OnDiffStatusReceived(diffs::Status const status) } StatusAndError Storage::GetNodeStatusInfo( - CountryTreeNode const & node, vector> & disputedTerritories, + CountryTreeNode const & node, vector> & disputedTerritories, bool isDisputedTerritoriesCounted) const { // Leaf node status. diff --git a/storage/storage.hpp b/storage/storage.hpp index 9408440f96..32769ae202 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -205,7 +205,7 @@ private: // calls to the diff manager's ApplyDiff are coordinated from the storage thread. base::Cancellable m_diffsCancellable; - boost::optional m_latestDiffRequest; + boost::optional m_latestDiffRequest; DownloadingPolicy m_defaultDownloadingPolicy; DownloadingPolicy * m_downloadingPolicy = &m_defaultDownloadingPolicy;