diff options
author | Yuri Gorshenin <y@maps.me> | 2015-10-09 14:07:44 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:02:22 +0300 |
commit | c854f3ea8269ffcd08b4106ab9a0254917540830 (patch) | |
tree | 12fb597795f012e50ce10583f38a104d91073413 /indexer/rank_table.hpp | |
parent | 7cab5585bd33564c796288060b81b17ee07343b6 (diff) |
Review fixes.
Diffstat (limited to 'indexer/rank_table.hpp')
-rw-r--r-- | indexer/rank_table.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indexer/rank_table.hpp b/indexer/rank_table.hpp index 0917c4d639..2d784c2a91 100644 --- a/indexer/rank_table.hpp +++ b/indexer/rank_table.hpp @@ -1,6 +1,7 @@ #pragma once #include "std/cstdint.hpp" +#include "std/string.hpp" #include "std/unique_ptr.hpp" #include "std/vector.hpp" @@ -86,13 +87,17 @@ public: // Calculates search ranks for all features in an mwm. static void CalcSearchRanks(FilesContainerR & rcont, vector<uint8_t> & ranks); - // Creates rank table for an mwm. + // Following methods create rank table for an mwm. // * When rank table already exists and has proper endianness, does nothing. // * When rank table already exists but has improper endianness, re-creates it by // reverse mapping. // * When rank table does not exist or exists but is damaged, calculates all // features' ranks and creates rank table. - static void CreateIfNotExists(platform::LocalCountryFile const & localFile); + // + // Return true if rank table was successfully generated and written + // or already exists and has correct format. + static bool CreateIfNotExists(platform::LocalCountryFile const & localFile) noexcept; + static bool CreateIfNotExists(string const & mapPath) noexcept; // Force creation of a rank table from array of ranks. Existing rank // table is removed (if any). Note that |wcont| must be instantiated |