diff options
author | Alex Zolotarev <alex@maps.me> | 2015-12-07 15:54:19 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:03:47 +0300 |
commit | e4e458851dddf1b4d2fdf229b4f33f7b4a952bab (patch) | |
tree | 2127d1a76a0f051c45b8686dc0c211b2447d585b /indexer/feature_loader.cpp | |
parent | 07575fb1b65fef14c2b9e762a9f028d9a2afae72 (diff) |
Replaced hard-code with constants.
Diffstat (limited to 'indexer/feature_loader.cpp')
-rw-r--r-- | indexer/feature_loader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indexer/feature_loader.cpp b/indexer/feature_loader.cpp index 935c6e0e6b..d2c9a7bcbf 100644 --- a/indexer/feature_loader.cpp +++ b/indexer/feature_loader.cpp @@ -303,8 +303,8 @@ int LoaderCurrent::GetScaleIndex(int scale) const switch (scale) { - case -2: return 0; - case -1: return count-1; + case FeatureType::WORST_GEOMETRY: return 0; + case FeatureType::BEST_GEOMETRY: return count - 1; default: for (int i = 0; i < count; ++i) if (scale <= m_Info.GetScale(i)) @@ -325,13 +325,13 @@ int LoaderCurrent::GetScaleIndex(int scale, offsets_t const & offsets) const switch (scale) { - case -1: + case FeatureType::BEST_GEOMETRY: // Choose the best existing geometry for the last visible scale. - ind = count-1; + ind = count - 1; while (ind >= 0 && offsets[ind] == s_InvalidOffset) --ind; break; - case -2: + case FeatureType::WORST_GEOMETRY: // Choose the worst existing geometry for the first visible scale. ind = 0; while (ind < count && offsets[ind] == s_InvalidOffset) ++ind; |