diff --git a/search/result.cpp b/search/result.cpp index 5411979832..82e55623c4 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -18,13 +18,13 @@ namespace search { using namespace std; -void Result::FromFeature(FeatureID const & id, uint32_t mainType, uint32_t featureType, Details const & details) +void Result::FromFeature(FeatureID const & id, uint32_t mainType, uint32_t matchedType, Details const & details) { m_id = id; ASSERT(m_id.IsValid(), ()); m_mainType = mainType; - m_featureType = featureType; + m_matchedType = matchedType; m_details = details; m_resultType = Type::Feature; } @@ -39,7 +39,7 @@ Result::Result(Result && res, string && suggest) , m_center(res.m_center) , m_str(std::move(res.m_str)) , m_address(std::move(res.m_address)) - , m_featureType(res.m_featureType) + , m_matchedType(res.m_matchedType) , m_suggestionStr(std::move(suggest)) , m_hightlightRanges(std::move(res.m_hightlightRanges)) { @@ -94,8 +94,8 @@ std::string Result::GetFeatureDescription() const if (!m_str.empty()) append(GetLocalizedTypeName(m_mainType)); - if (m_mainType != m_featureType && m_featureType != 0) - append(GetLocalizedTypeName(m_featureType)); + if (m_mainType != m_matchedType && m_matchedType != 0) + append(GetLocalizedTypeName(m_matchedType)); if (!GetDescription().empty()) append(GetDescription()); @@ -122,8 +122,8 @@ bool Result::IsEqualSuggest(Result const & r) const bool Result::IsEqualFeature(Result const & r) const { - /// @todo Compare TruncValue(m_featureType) ? - if (m_resultType != r.m_resultType || m_featureType != r.m_featureType) + /// @todo Compare TruncValue(m_matchedType) ? + if (m_resultType != r.m_resultType || m_matchedType != r.m_matchedType) return false; ASSERT_EQUAL(m_resultType, Result::Type::Feature, ()); @@ -143,12 +143,12 @@ bool Result::IsEqualFeature(Result const & r) const } // Filter stops (bus/tram), see BA_LasHeras test. - if (ftypes::IsPublicTransportStopChecker::Instance()(m_featureType)) + if (ftypes::IsPublicTransportStopChecker::Instance()(m_matchedType)) return PointDistance(m_center, r.m_center) < 150.0; /// @todo Keep this check until RemoveDuplicatingLinear will be fixed. // Filter same streets (with 'same logical street distance' threshold). - if (ftypes::IsWayChecker::Instance().GetSearchRank(m_featureType) != ftypes::IsWayChecker::Default) + if (ftypes::IsWayChecker::Instance().GetSearchRank(m_matchedType) != ftypes::IsWayChecker::Default) return PointDistance(m_center, r.m_center) < 2000.0; // Filter real duplicates when say area park is present in 2 MWMs, or OSM data duplicates. @@ -181,7 +181,7 @@ string Result::ToStringForStats() const { string readableType; if (GetResultType() == Type::Feature) - readableType = classif().GetReadableObjectName(m_featureType); + readableType = classif().GetReadableObjectName(m_matchedType); string s; s.append(GetString()); diff --git a/search/result.hpp b/search/result.hpp index 11071679cf..7879407f41 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -59,7 +59,7 @@ public: static auto constexpr kPopularityHighPriorityMinDistance = 50000.0; Result(m2::PointD const & pt, std::string const & name) : m_center(pt), m_str(name) {} - void FromFeature(FeatureID const & id, uint32_t mainType, uint32_t featureType, Details const & details); + void FromFeature(FeatureID const & id, uint32_t mainType, uint32_t matchedType, Details const & details); void SetAddress(std::string && address) { m_address = std::move(address); } void SetType(Result::Type type) { m_resultType = type; } @@ -149,7 +149,7 @@ private: std::string m_str; std::string m_address; uint32_t m_mainType = 0; - uint32_t m_featureType = 0; + uint32_t m_matchedType = 0; std::string m_suggestionStr; buffer_vector, 4> m_hightlightRanges;