Make non smart case full match better than smart case full match
This commit is contained in:
parent
016a50f213
commit
ec1824d3c3
|
@ -144,7 +144,11 @@ RankedMatch::RankedMatch(StringView candidate, StringView query, TestFunc func)
|
|||
{
|
||||
m_flags |= Flags::Prefix;
|
||||
if (query.length() == candidate.length())
|
||||
m_flags |= Flags::FullMatch;
|
||||
{
|
||||
m_flags |= Flags::SmartFullMatch;
|
||||
if (candidate == query)
|
||||
m_flags |= Flags::FullMatch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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