Fix: failing string search test

This commit is contained in:
Jacques Lucke 2023-10-06 17:27:48 +02:00
parent cf93c16775
commit 2fdb38f972
1 changed files with 3 additions and 3 deletions

View File

@ -443,9 +443,6 @@ void extract_normalized_words(StringRef str,
size_t size = offset;
uint32_t unicode = BLI_str_utf8_as_unicode_step_safe(str.data(), str.size(), &size);
size -= offset;
if (unicode == unicode_right_triangle) {
group_id++;
}
if (is_separator(unicode)) {
if (is_in_word) {
const StringRef word = str_copy.substr(int(word_start), int(offset - word_start));
@ -460,6 +457,9 @@ void extract_normalized_words(StringRef str,
is_in_word = true;
}
}
if (unicode == unicode_right_triangle) {
group_id++;
}
offset += size;
}
/* If the last word is not followed by a separator, it has to be handled separately. */