Make non smart case full match better than smart case full match
This commit is contained in:
parent
016a50f213
commit
ec1824d3c3
|
@ -144,9 +144,13 @@ RankedMatch::RankedMatch(StringView candidate, StringView query, TestFunc func)
|
|||
{
|
||||
m_flags |= Flags::Prefix;
|
||||
if (query.length() == candidate.length())
|
||||
{
|
||||
m_flags |= Flags::SmartFullMatch;
|
||||
if (candidate == query)
|
||||
m_flags |= Flags::FullMatch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_word_boundary_match_count = count_word_boundaries_match(candidate, query);
|
||||
if (m_word_boundary_match_count == query.length())
|
||||
|
|
|
@ -42,7 +42,8 @@ private:
|
|||
Contiguous = 1 << 2,
|
||||
OnlyWordBoundary = 1 << 3,
|
||||
Prefix = 1 << 4,
|
||||
FullMatch = 1 << 5,
|
||||
SmartFullMatch = 1 << 5,
|
||||
FullMatch = 1 << 6,
|
||||
};
|
||||
friend constexpr bool with_bit_ops(Meta::Type<Flags>) { return true; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user