Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/search
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-08-24 14:45:04 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:42:30 +0300
commit64470aa5b88fe579a46c8ed1ec99ac007f921267 (patch)
treeeb6d72d2a331db6b63bb9951a5d6cf86d52def47 /search
parentd45f63c6ccebc909d65ab657d08ef40b4b504dc2 (diff)
Add founded locality as a result if no other tokens to search.
Diffstat (limited to 'search')
-rw-r--r--search/search_query.cpp5
-rw-r--r--search/search_query.hpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/search/search_query.cpp b/search/search_query.cpp
index 9ecc0bac9d..a81faee681 100644
--- a/search/search_query.cpp
+++ b/search/search_query.cpp
@@ -899,6 +899,11 @@ void Query::SearchAddress()
SearchFeatures(params, mwmInfo, ADDRESS_RECT_ID);
m_worldSearch = b;
}
+ else
+ {
+ // Add founded locality as a result if nothing left to match.
+ AddResultFromTrie(loc.m_value, mwmId);
+ }
}
return;
}
diff --git a/search/search_query.hpp b/search/search_query.hpp
index 973bd953d4..cf6eaec866 100644
--- a/search/search_query.hpp
+++ b/search/search_query.hpp
@@ -103,7 +103,8 @@ private:
OffsetsVectorT & offsets);
void ClearCache(size_t ind);
- void AddResultFromTrie(TrieValueT const & val, size_t mwmID, int viewportID);
+ /// @param[in] viewportID @see m_viewport
+ void AddResultFromTrie(TrieValueT const & val, size_t mwmID, int viewportID = -1);
void FlushResults(Results & res, void (Results::*pAddFn)(Result const &));