Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2017-08-30 18:00:57 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2017-09-13 16:25:48 +0300
commit4265c34d5bc24ff5879d7770a0390681efe84e1b (patch)
treec6224c0f335f4c7a28bd64f3aad02eff7d472ab1 /storage
parent3af5ad4c4bc06711c395dd8233257de77c6b74f4 (diff)
Fixed canceling of diff download.
Diffstat (limited to 'storage')
-rw-r--r--storage/queued_country.cpp2
-rw-r--r--storage/storage.cpp8
-rw-r--r--storage/storage.hpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/storage/queued_country.cpp b/storage/queued_country.cpp
index 22a3aa0fb3..eeae6ea0cd 100644
--- a/storage/queued_country.cpp
+++ b/storage/queued_country.cpp
@@ -27,7 +27,7 @@ void QueuedCountry::AddOptions(MapOptions opt)
void QueuedCountry::RemoveOptions(MapOptions opt)
{
- for (MapOptions file : {MapOptions::Map, MapOptions::CarRouting})
+ for (MapOptions file : {MapOptions::Map, MapOptions::CarRouting, MapOptions::Diff})
{
if (HasOptions(opt, file) && HasOptions(m_init, file))
{
diff --git a/storage/storage.cpp b/storage/storage.cpp
index 7263d30dc0..ea2f8ab55b 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -511,7 +511,7 @@ void Storage::DeleteCountry(TCountryId const & countryId, MapOptions opt)
opt = NormalizeDeleteFileSet(opt);
bool const deferredDelete = m_willDelete(countryId, localFile);
DeleteCountryFiles(countryId, opt, deferredDelete);
- DeleteCountryFilesFromDownloader(countryId, opt);
+ DeleteCountryFilesFromDownloader(countryId);
NotifyStatusChangedForHierarchy(countryId);
}
@@ -632,7 +632,7 @@ void Storage::DeleteFromDownloader(TCountryId const & countryId)
{
ASSERT_THREAD_CHECKER(m_threadChecker, ());
- DeleteCountryFilesFromDownloader(countryId, MapOptions::MapWithCarRouting);
+ DeleteCountryFilesFromDownloader(countryId);
NotifyStatusChangedForHierarchy(countryId);
}
@@ -1134,7 +1134,7 @@ void Storage::DeleteCountryFiles(TCountryId const & countryId, MapOptions opt, b
m_localFiles.erase(countryId);
}
-bool Storage::DeleteCountryFilesFromDownloader(TCountryId const & countryId, MapOptions opt)
+bool Storage::DeleteCountryFilesFromDownloader(TCountryId const & countryId)
{
ASSERT_THREAD_CHECKER(m_threadChecker, ());
@@ -1142,7 +1142,7 @@ bool Storage::DeleteCountryFilesFromDownloader(TCountryId const & countryId, Map
if (!queuedCountry)
return false;
- opt = IntersectOptions(opt, queuedCountry->GetInitOptions());
+ MapOptions const opt = queuedCountry->GetInitOptions();
if (IsCountryFirstInQueue(countryId))
{
diff --git a/storage/storage.hpp b/storage/storage.hpp
index 3e95c538ba..c1beaa2eee 100644
--- a/storage/storage.hpp
+++ b/storage/storage.hpp
@@ -606,7 +606,7 @@ private:
void DeleteCountryFiles(TCountryId const & countryId, MapOptions opt, bool deferredDelete);
// Removes country files from downloader.
- bool DeleteCountryFilesFromDownloader(TCountryId const & countryId, MapOptions opt);
+ bool DeleteCountryFilesFromDownloader(TCountryId const & countryId);
// Returns download size of the currently downloading file for the
// queued country.