Clean up code

Signed-off-by: eisa01 <eisa01@gmail.com>
This commit is contained in:
eisa01
2025-08-28 15:10:15 +02:00
committed by Konstantin Pastbin
parent 6e8d74621f
commit 2ee305659b
4 changed files with 3 additions and 9 deletions

View File

@@ -59,7 +59,6 @@ static PlacePageDataSchedule convertOpeningHours(std::string_view rawOH)
return self;
}
@end
@implementation PlacePagePreviewData (Core)

View File

@@ -51,9 +51,9 @@ void HighlightResult(QueryTokens const & tokens, strings::UniString const & pref
std::string titleForHighlighting = res.GetString();
std::string const & branch = res.GetBranch();
// If we have a branch, create combined string for highlighting
// If we have a branch that is not already in the title, create combined string for highlighting
// This matches the iOS UI behavior where branch is appended as " branchText"
if (!branch.empty())
if (!branch.empty() && titleForHighlighting.find(branch) == std::string::npos)
{
titleForHighlighting += " " + branch;
}

View File

@@ -134,11 +134,6 @@ string const & Result::GetSuggestionString() const
return m_suggestionStr;
}
string Result::GetBranch() const
{
return m_branch;
}
bool Result::IsEqualSuggest(Result const & r) const
{
return m_suggestionStr == r.m_suggestionStr;

View File

@@ -76,7 +76,7 @@ public:
std::string const & GetString() const { return m_str; }
std::string const & GetAddress() const { return m_address; }
std::string const & GetDescription() const { return m_details.m_description; }
std::string GetBranch() const;
std::string const & GetBranch() const { return m_branch; }
osm::YesNoUnknown IsOpenNow() const { return m_details.m_isOpenNow; }
uint16_t GetMinutesUntilOpen() const { return m_details.m_minutesUntilOpen; }