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:
authorVlad Mihaylenko <vxmihaylenko@gmail.com>2016-07-14 16:55:25 +0300
committerGitHub <noreply@github.com>2016-07-14 16:55:25 +0300
commit775690d1dd83fd089992f557c822148623f7e6b0 (patch)
tree78b121c82839469e75f86c264ef2838ba4e0aece /search
parentcf14a00fb184efeda0213cd6ec979648819c5244 (diff)
parent40afad83fc99574175bb05705ac5ddffbb40d8d5 (diff)
Merge pull request #3786 from ygorshenin/fix-nasty-search-bugs
[search] Fixed nasty search bugs.
Diffstat (limited to 'search')
-rw-r--r--search/processor.cpp5
-rw-r--r--search/processor.hpp2
-rw-r--r--search/ranker.cpp6
3 files changed, 8 insertions, 5 deletions
diff --git a/search/processor.cpp b/search/processor.cpp
index dac426b5d0..930cfbe1a0 100644
--- a/search/processor.cpp
+++ b/search/processor.cpp
@@ -408,7 +408,7 @@ void Processor::Search(SearchParams const & params, m2::RectD const & viewport)
Geocoder::Params geocoderParams;
InitGeocoder(geocoderParams);
- InitPreRanker();
+ InitPreRanker(geocoderParams);
InitRanker();
try
@@ -681,11 +681,12 @@ void Processor::InitGeocoder(Geocoder::Params & params)
m_geocoder.SetParams(params);
}
-void Processor::InitPreRanker()
+void Processor::InitPreRanker(Geocoder::Params const & geocoderParams)
{
PreRanker::Params params;
params.m_accuratePivotCenter = GetPivotPoint();
+ params.m_scale = geocoderParams.m_scale;
m_preRanker.Init(params);
}
diff --git a/search/processor.hpp b/search/processor.hpp
index fd0d147251..be70b433b9 100644
--- a/search/processor.hpp
+++ b/search/processor.hpp
@@ -99,7 +99,7 @@ public:
void InitParams(QueryParams & params);
void InitGeocoder(Geocoder::Params & params);
- void InitPreRanker();
+ void InitPreRanker(Geocoder::Params const & geocoderParams);
void InitRanker();
void ClearCaches();
diff --git a/search/ranker.cpp b/search/ranker.cpp
index 5f40c81ec6..c833532b88 100644
--- a/search/ranker.cpp
+++ b/search/ranker.cpp
@@ -311,11 +311,13 @@ void Ranker::MakePreResult2(Geocoder::Params const & geocoderParams, vector<Inde
{
auto p = maker(r);
if (!p)
- return;
+ continue;
if (geocoderParams.m_mode == Mode::Viewport &&
!geocoderParams.m_pivot.IsPointInside(p->GetCenter()))
- return;
+ {
+ continue;
+ }
if (p->IsStreet())
streets.push_back(p->GetID());