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; diff --git a/indexer/old/feature_loader_101.cpp b/indexer/old/feature_loader_101.cpp index 4b2219f158..f16cc61c26 100644 --- a/indexer/old/feature_loader_101.cpp +++ b/indexer/old/feature_loader_101.cpp @@ -185,7 +185,8 @@ void LoaderImpl::ParseCommon() int LoaderImpl::GetScaleIndex(int scale) const { int const count = m_Info.GetScalesCount(); - if (scale == -1) return count-1; + if (scale == FeatureType::BEST_GEOMETRY) + return count - 1; for (int i = 0; i < count; ++i) if (scale <= m_Info.GetScale(i)) @@ -195,7 +196,7 @@ int LoaderImpl::GetScaleIndex(int scale) const int LoaderImpl::GetScaleIndex(int scale, offsets_t const & offsets) const { - if (scale == -1) + if (scale == FeatureType::BEST_GEOMETRY) { // Choose the best geometry for the last visible scale. int i = static_cast(offsets.size()-1);