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:
authorvng <viktor.govako@gmail.com>2012-06-23 02:11:44 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:40:11 +0300
commit5e02a090f27966d41f2d25050e699afc5b3e12b5 (patch)
tree0699afc4d20cbd18972830af74c6093c434f27af /storage
parentc4f3cd83b0c08288e05bf40bbff34628aa28be22 (diff)
[android] Fix bug in startup screen. We can't call deleteCountry before Storage is initialized.
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.cpp8
-rw-r--r--storage/storage.hpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index 5c9dbe9780..cf835ad1d2 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -242,7 +242,7 @@ namespace storage
{
m_workingDir = GetPlatform().WritableDir();
}
- /// @TODO do not delete other countries cells
+
void operator()(CountryFile const & file)
{
FileWriter::DeleteFileX(m_workingDir + file.m_fileName + DOWNLOADING_FILE_EXTENSION);
@@ -266,6 +266,12 @@ namespace storage
return country.Bounds();
}
+ void Storage::DeleteCountryFiles(TIndex const & index)
+ {
+ Country const & country = CountryByIndex(index);
+ for_each(country.Files().begin(), country.Files().end(), DeleteMap());
+ }
+
void Storage::DeleteCountry(TIndex const & index)
{
Country const & country = CountryByIndex(index);
diff --git a/storage/storage.hpp b/storage/storage.hpp
index 31e3ef33c7..4c25ffb41a 100644
--- a/storage/storage.hpp
+++ b/storage/storage.hpp
@@ -126,7 +126,6 @@ namespace storage
//void GenerateSearchIndex(TIndex const & index, string const & fName);
void UpdateAfterSearchIndex(TIndex const & index, string const & fName);
- /// @TODO temporarily made public for Android, refactor
void LoadCountriesFile(bool forceReload);
void ReportProgress(TIndex const & index, pair<int64_t, int64_t> const & p);
@@ -165,6 +164,7 @@ namespace storage
void DownloadCountry(TIndex const & index);
void DeleteCountry(TIndex const & index);
+ void DeleteCountryFiles(TIndex const & index);
void CheckForUpdate();