diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp index 88b6104c7f..f0122150af 100644 --- a/indexer/classificator_loader.cpp +++ b/indexer/classificator_loader.cpp @@ -45,12 +45,4 @@ namespace classificator ReaderType(new FileReader(fPath)).ReadAsString(buffer); classif().ReadVisibility(buffer); } - - uint32_t GetTestDefaultType() - { - vector v; - v.push_back("highway"); - v.push_back("motorway"); - return classif().GetTypeByPath(v); - } } diff --git a/indexer/classificator_loader.hpp b/indexer/classificator_loader.hpp index 8b14dbb531..4dea155150 100644 --- a/indexer/classificator_loader.hpp +++ b/indexer/classificator_loader.hpp @@ -14,7 +14,4 @@ namespace classificator ReaderType const & visibility, ReaderType const & types); void ReadVisibility(string const & fPath); - - /// This function used only in unit test to get any valid type value for feature testing. - uint32_t GetTestDefaultType(); } diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp index 47e2161f4a..da77784838 100644 --- a/indexer/data_header.cpp +++ b/indexer/data_header.cpp @@ -48,6 +48,8 @@ namespace feature default: ASSERT_EQUAL(type, country, ()); return make_pair(worldH + 1, high); + + // Uncomment this to test countries drawing in all scales. //return make_pair(low, high); } } @@ -91,8 +93,9 @@ namespace feature m_bounds.first = ReadVarInt(src) + base; m_bounds.second = ReadVarInt(src) + base; - m_scales.resize(4); - src.Read(m_scales.data(), m_scales.size()); + uint32_t const count = 4; + m_scales.resize(count); + src.Read(m_scales.data(), count); m_ver = v1; } diff --git a/indexer/data_header.hpp b/indexer/data_header.hpp index bb21f58326..ea35422c5f 100644 --- a/indexer/data_header.hpp +++ b/indexer/data_header.hpp @@ -15,6 +15,7 @@ namespace feature class DataHeader { public: + /// Max possible scales. @see arrays in feature_impl.hpp static const size_t MAX_SCALES_COUNT = 4; private: @@ -47,7 +48,7 @@ namespace feature inline size_t GetScalesCount() const { return m_scales.size(); } inline int GetScale(int i) const { return static_cast(m_scales[i]); } - inline int GetLastScale() const { return GetScale(static_cast(GetScalesCount()) - 1); } + inline int GetLastScale() const { return m_scales.back(); } pair GetScaleRange() const;