diff options
author | Maxim Pimenov <m@maps.me> | 2015-09-01 17:37:19 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:03:40 +0300 |
commit | d05142ff1cd106839d1c592743d299af2408208d (patch) | |
tree | 5f6e435833f783a9ada63d20efac63978164a473 /indexer | |
parent | fb97d4384e4170d773b67e5c2e896a1ba57a0f99 (diff) |
[omim] [indexer] Move ScaleIndexBase implementation into the .hpp file.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/indexer.pro | 1 | ||||
-rw-r--r-- | indexer/scale_index.cpp | 19 | ||||
-rw-r--r-- | indexer/scale_index.hpp | 10 |
3 files changed, 7 insertions, 23 deletions
diff --git a/indexer/indexer.pro b/indexer/indexer.pro index 11e49e09e8..88556f1f54 100644 --- a/indexer/indexer.pro +++ b/indexer/indexer.pro @@ -40,7 +40,6 @@ SOURCES += \ mwm_set.cpp \ old/feature_loader_101.cpp \ point_to_int64.cpp \ - scale_index.cpp \ scales.cpp \ search_delimiters.cpp \ search_index_builder.cpp \ diff --git a/indexer/scale_index.cpp b/indexer/scale_index.cpp deleted file mode 100644 index a3c9195aad..0000000000 --- a/indexer/scale_index.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "indexer/scale_index.hpp" - - -/// Using default one to one mapping. - -uint32_t ScaleIndexBase::GetBucketsCount() -{ - return 18; -} - -uint32_t ScaleIndexBase::BucketByScale(uint32_t scale) -{ - return scale; -} - -pair<uint32_t, uint32_t> ScaleIndexBase::ScaleRangeForBucket(uint32_t bucket) -{ - return make_pair(bucket, bucket + 1); -} diff --git a/indexer/scale_index.hpp b/indexer/scale_index.hpp index 6c3e60b3c2..d290b1a1a3 100644 --- a/indexer/scale_index.hpp +++ b/indexer/scale_index.hpp @@ -12,13 +12,17 @@ /// Index bucket <--> Draw scale range. +/// Using default one-to-one mapping. class ScaleIndexBase { public: - static uint32_t GetBucketsCount(); - static uint32_t BucketByScale(uint32_t scale); + static uint32_t GetBucketsCount() { return 18; } + static uint32_t BucketByScale(uint32_t scale) { return scale; } /// @return Range like [x, y). - static pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket); + static pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket) + { + return {bucket, bucket + 1}; + } }; template <class ReaderT> |