diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/diff_scheme/diff_manager.cpp | 4 | ||||
-rw-r--r-- | storage/queued_country.hpp | 4 | ||||
-rw-r--r-- | storage/storage.cpp | 16 | ||||
-rw-r--r-- | storage/storage_integration_tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | storage/storage_tests/CMakeLists.txt | 1 |
5 files changed, 14 insertions, 12 deletions
diff --git a/storage/diff_scheme/diff_manager.cpp b/storage/diff_scheme/diff_manager.cpp index bf64f62389..a8180c8f6b 100644 --- a/storage/diff_scheme/diff_manager.cpp +++ b/storage/diff_scheme/diff_manager.cpp @@ -38,10 +38,10 @@ void Manager::Load(LocalMapsInfo && info) m_status = Status::Available; } - auto const & observers = m_observers; + auto & observers = m_observers; GetPlatform().RunOnGuiThread([observers]() mutable { - //observers.ForEach(&Observer::OnDiffStatusReceived); + observers.ForEach(&Observer::OnDiffStatusReceived); }); }); } diff --git a/storage/queued_country.hpp b/storage/queued_country.hpp index 0747fe018d..7af9a31fb8 100644 --- a/storage/queued_country.hpp +++ b/storage/queued_country.hpp @@ -22,8 +22,8 @@ public: inline TCountryId const & GetCountryId() const { return m_countryId; } inline MapOptions GetInitOptions() const { return m_init; } - inline MapOptions GetCurrentFile() const { return m_current; } - inline MapOptions GetDownloadedFiles() const { return UnsetOptions(m_init, m_left); } + inline MapOptions GetCurrentFileOptions() const { return m_current; } + inline MapOptions GetDownloadedFilesOptions() const { return UnsetOptions(m_init, m_left); } inline bool operator==(TCountryId const & countryId) const { return m_countryId == countryId; } diff --git a/storage/storage.cpp b/storage/storage.cpp index bdb7530a65..7badee1d5f 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -358,7 +358,7 @@ TLocalAndRemoteSize Storage::CountrySizeInBytes(TCountryId const & countryId, Ma { sizes.first = m_downloader->GetDownloadingProgress().first + - GetRemoteSize(countryFile, queuedCountry->GetDownloadedFiles(), GetCurrentDataVersion()); + GetRemoteSize(countryFile, queuedCountry->GetDownloadedFilesOptions(), GetCurrentDataVersion()); } return sizes; } @@ -614,7 +614,7 @@ void Storage::DownloadNextFile(QueuedCountry const & country) TCountryId const & countryId = country.GetCountryId(); CountryFile const & countryFile = GetCountryFile(countryId); - string const filePath = GetFileDownloadPath(countryId, country.GetCurrentFile()); + string const filePath = GetFileDownloadPath(countryId, country.GetCurrentFileOptions()); uint64_t size; // It may happen that the file already was downloaded, so there're @@ -801,7 +801,7 @@ void Storage::OnServerListDownloaded(vector<string> const & urls) fileUrls.push_back(GetFileDownloadUrl(url, queuedCountry)); string const filePath = - GetFileDownloadPath(queuedCountry.GetCountryId(), queuedCountry.GetCurrentFile()); + GetFileDownloadPath(queuedCountry.GetCountryId(), queuedCountry.GetCurrentFileOptions()); m_downloader->DownloadMapFile(fileUrls, filePath, GetDownloadSize(queuedCountry), bind(&Storage::OnMapFileDownloadFinished, this, _1, _2), bind(&Storage::OnMapFileDownloadProgress, this, _1)); @@ -941,7 +941,7 @@ string Storage::GetFileDownloadUrl(string const & baseUrl, auto const & countryId = queuedCountry.GetCountryId(); CountryFile const & countryFile = GetCountryFile(countryId); - auto const currentFileOpt = queuedCountry.GetCurrentFile(); + auto const currentFileOpt = queuedCountry.GetCurrentFileOptions(); string const fileName = GetFileName(countryFile.GetName(), currentFileOpt, GetCurrentDataVersion()); @@ -1164,7 +1164,7 @@ bool Storage::DeleteCountryFilesFromDownloader(TCountryId const & countryId, Map if (IsCountryFirstInQueue(countryId)) { // Abrupt downloading of the current file if it should be removed. - if (HasOptions(opt, queuedCountry->GetCurrentFile())) + if (HasOptions(opt, queuedCountry->GetCurrentFileOptions())) m_downloader->Reset(); // Remove all files downloader had been created for a country. @@ -1208,13 +1208,13 @@ uint64_t Storage::GetDownloadSize(QueuedCountry const & queuedCountry) const return m_diffManager.InfoFor(countryId).m_size; CountryFile const & file = GetCountryFile(countryId); - return GetRemoteSize(file, queuedCountry.GetCurrentFile(), GetCurrentDataVersion()); + return GetRemoteSize(file, queuedCountry.GetCurrentFileOptions(), GetCurrentDataVersion()); } -string Storage::GetFileDownloadPath(TCountryId const & countryId, MapOptions file) const +string Storage::GetFileDownloadPath(TCountryId const & countryId, MapOptions options) const { return platform::GetFileDownloadPath(GetCurrentDataVersion(), m_dataDir, - GetCountryFile(countryId), file); + GetCountryFile(countryId), options); } bool Storage::CheckFailedCountries(TCountriesVec const & countries) const diff --git a/storage/storage_integration_tests/CMakeLists.txt b/storage/storage_integration_tests/CMakeLists.txt index cf504745bc..505e5733f4 100644 --- a/storage/storage_integration_tests/CMakeLists.txt +++ b/storage/storage_integration_tests/CMakeLists.txt @@ -36,6 +36,7 @@ omim_link_libraries( platform editor opening_hours + mwm_diff geometry coding base diff --git a/storage/storage_tests/CMakeLists.txt b/storage/storage_tests/CMakeLists.txt index 1ecd39928f..be98bc6e3d 100644 --- a/storage/storage_tests/CMakeLists.txt +++ b/storage/storage_tests/CMakeLists.txt @@ -41,6 +41,7 @@ omim_link_libraries( oauthcpp platform opening_hours + mwm_diff geometry coding base |