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>2011-01-09 16:11:43 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:09:35 +0300
commit83011c67dce2c938ff88d7520d5ad64fef17eca7 (patch)
tree1a9f1d91d9e57a6fb04e80a59238f79af0cd6786 /indexer/feature_impl.hpp
parent391fc9aadf51659dff7286cd29197c3606c56c47 (diff)
Build index for the best geometry (highest drawable scale).
Diffstat (limited to 'indexer/feature_impl.hpp')
-rw-r--r--indexer/feature_impl.hpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/indexer/feature_impl.hpp b/indexer/feature_impl.hpp
index 269619e4bb..dc7eea151c 100644
--- a/indexer/feature_impl.hpp
+++ b/indexer/feature_impl.hpp
@@ -119,7 +119,7 @@ namespace feature
static int g_arrScales[] = { 5, 10, 14, 17 }; // 17 = scales::GetUpperScale()
- inline string GetTagForScale(char const * prefix, int scale)
+ inline string GetTagForIndex(char const * prefix, int ind)
{
string str;
str.reserve(strlen(prefix) + 1);
@@ -127,14 +127,9 @@ namespace feature
static char arrChar[] = { '0', '1', '2', '3' };
STATIC_ASSERT ( ARRAY_SIZE(arrChar) == ARRAY_SIZE(g_arrScales) );
+ ASSERT ( ind >= 0 && ind < ARRAY_SIZE(arrChar), (ind) );
- for (size_t i = 0; i < ARRAY_SIZE(feature::g_arrScales); ++i)
- if (scale <= feature::g_arrScales[i])
- {
- str += arrChar[i];
- break;
- }
-
+ str += arrChar[ind];
return str;
}
}