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:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-02-03 13:03:24 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:21:36 +0300
commitf5d0c3b12e72604565c51829f6f976bfb62e36c9 (patch)
treef568780db53e85a413b1bdc51adb5e1789a3077b /platform
parent5cc7c09e7fe39c2df22e45c0154c11551f96a567 (diff)
[new downloader] Adding LocalCountryFile::SyncWithDisk() assumption that every single mwm has a routing sections.
Diffstat (limited to 'platform')
-rw-r--r--platform/local_country_file.cpp4
-rw-r--r--platform/local_country_file.hpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/local_country_file.cpp b/platform/local_country_file.cpp
index b643df6540..a84bd59d62 100644
--- a/platform/local_country_file.cpp
+++ b/platform/local_country_file.cpp
@@ -39,7 +39,11 @@ void LocalCountryFile::SyncWithDisk()
m_files = SetOptions(m_files, MapOptions::Map);
if (version::IsSingleMwm(GetVersion()))
+ {
+ if (m_files == MapOptions::Map)
+ m_files = SetOptions(m_files, MapOptions::CarRouting);
return;
+ }
string const routingPath = GetPath(MapOptions::CarRouting);
if (platform.GetFileSizeByFullPath(routingPath, m_routingSize))
diff --git a/platform/local_country_file.hpp b/platform/local_country_file.hpp
index cece30156d..fa0fbec278 100644
--- a/platform/local_country_file.hpp
+++ b/platform/local_country_file.hpp
@@ -35,6 +35,10 @@ public:
// Syncs internal state like availability of map and routing files,
// their sizes etc. with disk.
+ // In case of one component (single) mwm this method assumed the every mwm has a routing section.
+ // Generality speaking it's not always true. To know it for sure it's necessary to read a mwm in
+ // this method but it's not implemented by performance reasons. This check is done on
+ // building routes stage.
void SyncWithDisk();
// Removes specified files from disk if they're known for LocalCountryFile, i.e.