From c645d1837751a49a3cece8c2210e0d98620fde66 Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Tue, 3 Sep 2019 18:44:26 +0300 Subject: [PATCH] [search] Remove trie::GetGeometryCodingParams. --- generator/dumper.cpp | 4 +--- generator/search_index_builder.cpp | 4 +--- search/retrieval.cpp | 4 +--- search/search_index_values.hpp | 3 --- search/search_trie.hpp | 11 ----------- 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/generator/dumper.cpp b/generator/dumper.cpp index 9558d314b9..5002570272 100644 --- a/generator/dumper.cpp +++ b/generator/dumper.cpp @@ -199,11 +199,9 @@ namespace feature FilesContainerR container(make_unique(fPath)); feature::DataHeader header(container); - serial::GeometryCodingParams codingParams( - trie::GetGeometryCodingParams(header.GetDefGeometryCodingParams())); auto const trieRoot = trie::ReadTrie>( - container.GetReader(SEARCH_INDEX_FILE_TAG), SingleValueSerializer(codingParams)); + container.GetReader(SEARCH_INDEX_FILE_TAG), SingleValueSerializer()); SearchTokensCollector f; trie::ForEachRef(*trieRoot, f, strings::UniString()); diff --git a/generator/search_index_builder.cpp b/generator/search_index_builder.cpp index d4421bbfd0..f060c40c20 100644 --- a/generator/search_index_builder.cpp +++ b/generator/search_index_builder.cpp @@ -583,9 +583,7 @@ void BuildSearchIndex(FilesContainerR & container, Writer & indexWriter) auto const & categoriesHolder = GetDefaultCategories(); FeaturesVectorTest features(container); - auto codingParams = - trie::GetGeometryCodingParams(features.GetHeader().GetDefGeometryCodingParams()); - SingleValueSerializer serializer(codingParams); + SingleValueSerializer serializer; vector> searchIndexKeyValuePairs; AddFeatureNameIndexPairs(features, categoriesHolder, searchIndexKeyValuePairs); diff --git a/search/retrieval.cpp b/search/retrieval.cpp index 6728879342..10831b47db 100644 --- a/search/retrieval.cpp +++ b/search/retrieval.cpp @@ -339,10 +339,8 @@ struct RetrievePostcodeFeaturesAdaptor template unique_ptr> ReadTrie(MwmValue & value, ModelReaderPtr & reader) { - serial::GeometryCodingParams params( - trie::GetGeometryCodingParams(value.GetHeader().GetDefGeometryCodingParams())); return trie::ReadTrie, ValueList>( - SubReaderWrapper(reader.GetPtr()), SingleValueSerializer(params)); + SubReaderWrapper(reader.GetPtr()), SingleValueSerializer()); } } // namespace diff --git a/search/search_index_values.hpp b/search/search_index_values.hpp index 1d61d8dd4c..a037dbbb37 100644 --- a/search/search_index_values.hpp +++ b/search/search_index_values.hpp @@ -61,9 +61,6 @@ public: SingleValueSerializer() = default; - // todo(@mpimenov). Remove. - SingleValueSerializer(serial::GeometryCodingParams const & /* codingParams */) {} - // The serialization and deserialization is needed for StringsFile. // Use ValueList for group serialization in CBVs. template diff --git a/search/search_trie.hpp b/search/search_trie.hpp index b257761d63..6e8da1fac9 100644 --- a/search/search_trie.hpp +++ b/search/search_trie.hpp @@ -9,15 +9,4 @@ namespace search { static const uint8_t kCategoriesLang = 128; static const uint8_t kPostcodesLang = 129; -static const uint8_t kPointCodingBits = 20; } // namespace search - -namespace trie -{ -inline serial::GeometryCodingParams GetGeometryCodingParams( - serial::GeometryCodingParams const & orig) -{ - return serial::GeometryCodingParams(search::kPointCodingBits, - PointUToPointD(orig.GetBasePoint(), orig.GetCoordBits())); -} -} // namespace trie