diff options
author | Maxim Pimenov <m@maps.me> | 2019-03-13 16:54:40 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-03-18 18:42:54 +0300 |
commit | a95e858c6ecbd90d80ed5cffcdb124d915835e61 (patch) | |
tree | 5e74269ff6f1b75f86667a5a3581cedc77d8292f /platform | |
parent | a4b6780b25ddc71d8909d1cefbfa4fff1b45e71b (diff) |
Review fixes.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/chunks_download_strategy.cpp | 2 | ||||
-rw-r--r-- | platform/local_country_file_utils.cpp | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/platform/chunks_download_strategy.cpp b/platform/chunks_download_strategy.cpp index e00fa47c82..3a44d20d2e 100644 --- a/platform/chunks_download_strategy.cpp +++ b/platform/chunks_download_strategy.cpp @@ -6,7 +6,9 @@ #include "coding/file_reader.hpp" #include "coding/varint.hpp" +#include "base/assert.hpp" #include "base/logging.hpp" +#include "base/macros.hpp" #include "std/algorithm.hpp" diff --git a/platform/local_country_file_utils.cpp b/platform/local_country_file_utils.cpp index a31ed6afb4..67c8a9aade 100644 --- a/platform/local_country_file_utils.cpp +++ b/platform/local_country_file_utils.cpp @@ -136,11 +136,11 @@ void FindAllDiffsInDirectory(string const & dir, vector<LocalCountryFile> & diff string GetFilePath(int64_t version, string const & dataDir, CountryFile const & countryFile, MapOptions options) { - string const readyFile = GetFileName(countryFile.GetName(), options, version); + string const filename = GetFileName(countryFile.GetName(), options, version); string const dir = GetDataDirFullPath(dataDir); if (version == 0) - return base::JoinFoldersToPath(dir, readyFile); - return base::JoinFoldersToPath({dir, strings::to_string(version)}, readyFile); + return base::JoinFoldersToPath(dir, filename); + return base::JoinFoldersToPath({dir, strings::to_string(version)}, filename); } } // namespace @@ -274,9 +274,10 @@ void FindAllLocalMapsAndCleanup(int64_t latestVersion, string const & dataDir, // World and WorldCoasts can be stored in app bundle or in resources // directory, thus it's better to get them via Platform. - for (string const & file : - {WORLD_FILE_NAME, - (migrate::NeedMigrate() ? WORLD_COASTS_OBSOLETE_FILE_NAME : WORLD_COASTS_FILE_NAME)}) + string const world(WORLD_FILE_NAME); + string const worldCoasts(migrate::NeedMigrate() ? WORLD_COASTS_OBSOLETE_FILE_NAME + : WORLD_COASTS_FILE_NAME); + for (string const & file : {world, worldCoasts}) { auto i = localFiles.begin(); for (; i != localFiles.end(); ++i) |