From b4f30af73f15f67ff4222b43591dbcedaf8ce57e Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Wed, 20 Jun 2018 18:20:10 +0300 Subject: [PATCH] [search] Return POI type before building type to recognize POIs with address. --- search/model.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/search/model.cpp b/search/model.cpp index b0c52067cc..20dc87a3cf 100644 --- a/search/model.cpp +++ b/search/model.cpp @@ -85,6 +85,10 @@ Model::Type Model::GetType(FeatureType const & feature) const static auto const & localityChecker = IsLocalityChecker::Instance(); static auto const & poiChecker = IsPoiChecker::Instance(); + // Check whether object is POI first to mark POIs with address tags as POI. + if (poiChecker(feature)) + return TYPE_POI; + if (buildingChecker(feature)) return TYPE_BUILDING; @@ -106,9 +110,6 @@ Model::Type Model::GetType(FeatureType const & feature) const } } - if (poiChecker(feature)) - return TYPE_POI; - return TYPE_UNCLASSIFIED; }