diff options
author | tatiana-kondakova <tatiana.kondakova@gmail.com> | 2018-01-29 16:36:12 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2018-01-30 13:30:27 +0300 |
commit | ff52dcc7a3197beb633ee7d7d1b574a34bf93156 (patch) | |
tree | 057706635aefce545e0e9046d166dd861e4071b0 /indexer/scale_index.hpp | |
parent | f3edb952b972d51031371d1c45ce2e8c85e47535 (diff) |
Remove GeoIndex 2011 format support
Diffstat (limited to 'indexer/scale_index.hpp')
-rw-r--r-- | indexer/scale_index.hpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indexer/scale_index.hpp b/indexer/scale_index.hpp index 029dae15c1..bcc71d52ba 100644 --- a/indexer/scale_index.hpp +++ b/indexer/scale_index.hpp @@ -1,14 +1,13 @@ #pragma once #include "indexer/data_factory.hpp" -#include "indexer/interval_index_iface.hpp" +#include "indexer/interval_index.hpp" #include "coding/var_serial_vector.hpp" -#include "base/stl_add.hpp" - -#include "std/algorithm.hpp" -#include "std/bind.hpp" +#include <cstdint> +#include <memory> +#include <vector> /// Index bucket <--> Draw scale range. @@ -19,7 +18,7 @@ public: static uint32_t GetBucketsCount() { return 18; } static uint32_t BucketByScale(int scale) { return static_cast<uint32_t>(scale); } /// @return Range like [x, y). - static pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket) + static std::pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket) { return {bucket, bucket + 1}; } @@ -45,7 +44,6 @@ public: void Clear() { - for_each(m_IndexForScale.begin(), m_IndexForScale.end(), DeleteFunctor()); m_IndexForScale.clear(); } @@ -65,12 +63,11 @@ public: auto const scaleBucket = BucketByScale(scale); if (scaleBucket < m_IndexForScale.size()) { - IntervalIndexIFace::FunctionT f1(cref(f)); for (size_t i = 0; i <= scaleBucket; ++i) - m_IndexForScale[i]->DoForEach(f1, beg, end); + m_IndexForScale[i]->ForEach(f, beg, end); } } private: - vector<IntervalIndexIFace *> m_IndexForScale; + std::vector<std::unique_ptr<IntervalIndex<ReaderT>>> m_IndexForScale; }; |