mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -33,16 +33,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(CombinedIterator const & other) const
|
||||
{
|
||||
return m_val == other.m_val && m_cur == other.m_cur;
|
||||
}
|
||||
bool operator==(CombinedIterator const & other) const { return m_val == other.m_val && m_cur == other.m_cur; }
|
||||
|
||||
bool operator!=(CombinedIterator const & other) const { return !(*this == other); }
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
void HighlightResult(QueryTokens const & tokens, strings::UniString const & prefix, Result & res)
|
||||
{
|
||||
using Iter = QueryTokens::const_iterator;
|
||||
@@ -52,17 +48,11 @@ void HighlightResult(QueryTokens const & tokens, strings::UniString const & pref
|
||||
CombinedIter end(tokens.end() /* cur */, tokens.end() /* end */, nullptr);
|
||||
|
||||
// Highlight Title
|
||||
SearchStringTokensIntersectionRanges(res.GetString(), beg, end,
|
||||
[&](std::pair<uint16_t, uint16_t> const & range)
|
||||
{
|
||||
res.AddHighlightRange(range);
|
||||
});
|
||||
SearchStringTokensIntersectionRanges(
|
||||
res.GetString(), beg, end, [&](std::pair<uint16_t, uint16_t> const & range) { res.AddHighlightRange(range); });
|
||||
|
||||
// Highlight description.
|
||||
SearchStringTokensIntersectionRanges(res.GetAddress(), beg, end,
|
||||
[&](std::pair<uint16_t, uint16_t> const & range)
|
||||
{
|
||||
res.AddDescHighlightRange(range);
|
||||
});
|
||||
SearchStringTokensIntersectionRanges(res.GetAddress(), beg, end, [&](std::pair<uint16_t, uint16_t> const & range)
|
||||
{ res.AddDescHighlightRange(range); });
|
||||
}
|
||||
} // namespace search
|
||||
|
||||
Reference in New Issue
Block a user