[search] Get hotel's search mark using SetFromType

Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
David Martinez 2023-12-21 19:03:40 +01:00 committed by Viktor Govako
parent a3ee99035d
commit 3f81ad6f30
3 changed files with 10 additions and 12 deletions

View file

@ -1418,11 +1418,7 @@ void Framework::FillSearchResultsMarks(SearchResultsIterT beg, SearchResultsIter
{
auto const fID = r.GetFeatureID();
mark->SetFoundFeature(fID);
if (r.m_details.m_isHotel)
mark->SetHotelType();
else
mark->SetFromType(r.GetFeatureType());
mark->SetFromType(r.GetFeatureType());
mark->SetVisited(m_searchMarks.IsVisited(fID));
mark->SetSelected(m_searchMarks.IsSelected(fID));
}

View file

@ -167,7 +167,15 @@ private:
{{"shop", "toys"}, SearchMarkType::ShopToys},
{{"tourism", "theme_park"}, SearchMarkType::ThemePark},
{{"leisure", "water_park"}, SearchMarkType::WaterPark},
{{"tourism", "zoo"}, SearchMarkType::Zoo}
{{"tourism", "zoo"}, SearchMarkType::Zoo},
{{"tourism", "hotel"}, SearchMarkType::Hotel},
{{"tourism", "apartment"}, SearchMarkType::Hotel},
{{"tourism", "camp_site"}, SearchMarkType::Hotel},
{{"tourism", "chalet"}, SearchMarkType::Hotel},
{{"tourism", "guest_house"}, SearchMarkType::Hotel},
{{"tourism", "hostel"}, SearchMarkType::Hotel},
{{"tourism", "motel"}, SearchMarkType::Hotel},
{{"tourism", "resort"}, SearchMarkType::Hotel}
};
m_searchMarkTypes.reserve(table.size());
@ -271,11 +279,6 @@ void SearchMarkPoint::SetFromType(uint32_t type)
SetAttributeValue(m_type, GetSearchMarkType(type));
}
void SearchMarkPoint::SetHotelType()
{
SetAttributeValue(m_type, SearchMarkType::Hotel);
}
void SearchMarkPoint::SetNotFoundType()
{
SetAttributeValue(m_type, SearchMarkType::NotFound);

View file

@ -48,7 +48,6 @@ public:
void SetMatchedName(std::string const & name);
void SetFromType(uint32_t type);
void SetHotelType();
void SetNotFoundType();
void SetPreparing(bool isPreparing);