1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Assistant: Compare two chars instead of StringViews of length 1

This commit is contained in:
Yuval Tasher 2021-07-07 16:35:00 +03:00 committed by Andreas Kling
parent f6f14777ac
commit b08383c48d

View file

@ -42,7 +42,7 @@ static FuzzyMatchResult fuzzy_match_recursive(String const& needle, String const
bool first_match = true;
while (needle_idx < needle.length() && haystack_idx < haystack.length()) {
if (needle.substring_view(needle_idx, 1).equals_ignoring_case(haystack.substring_view(haystack_idx, 1))) {
if (to_ascii_lowercase(needle[needle_idx]) == to_ascii_lowercase(haystack[haystack_idx])) {
if (next_match >= MAX_MATCHES)
return { false, out_score };