Minor FeatureType api fixes.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako 2022-01-14 00:54:39 +03:00
parent cf85cb852f
commit 320f9712a3
3 changed files with 6 additions and 7 deletions

View file

@ -771,7 +771,7 @@ void FeatureType::GetReadableName(bool allowTranslit, int8_t deviceLang, string
::GetReadableName(mwmInfo->GetRegionData(), GetNames(), deviceLang, allowTranslit, name);
}
string FeatureType::GetHouseNumber()
string const & FeatureType::GetHouseNumber()
{
ParseCommon();
return m_params.house.Get();
@ -794,7 +794,7 @@ uint8_t FeatureType::GetRank()
uint64_t FeatureType::GetPopulation() { return feature::RankToPopulation(GetRank()); }
string FeatureType::GetRoadNumber()
string const & FeatureType::GetRoadNumber()
{
ParseCommon();
return m_params.ref;
@ -816,7 +816,7 @@ std::string FeatureType::GetMetadata(feature::Metadata::EType type)
if (it == m_metaIds.end())
return {};
auto const value = m_metadataDeserializer->GetMetaById(it->second);
auto value = m_metadataDeserializer->GetMetaById(it->second);
m_metadata.Set(type, value);
return value;
}

View file

@ -38,7 +38,6 @@ public:
FeatureType(osm::MapObject const & emo);
feature::GeomType GetGeomType() const;
FeatureParamsBase & GetParams() { return m_params; }
uint8_t GetTypesCount() const { return (m_header & feature::HEADER_MASK_TYPE) + 1; }
@ -134,7 +133,7 @@ public:
std::string DebugString(int scale);
std::string GetHouseNumber();
std::string const & GetHouseNumber();
/// @name Get names for feature.
/// @param[out] defaultName corresponds to osm tag "name"
@ -153,7 +152,7 @@ public:
uint8_t GetRank();
uint64_t GetPopulation();
std::string GetRoadNumber();
std::string const & GetRoadNumber();
feature::Metadata const & GetMetadata();

View file

@ -208,7 +208,7 @@ bool Matcher::Matches(strings::UniString const & query, Sample::Result const & g
{
if (ft.GetGeomType() == feature::GeomType::Line)
{
nameMatches = StreetMatches(ft.GetParams().ref, queryTokens);
nameMatches = StreetMatches(ft.GetRoadNumber(), queryTokens);
}
else
{