summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ranked_match.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ranked_match.cc b/src/ranked_match.cc
index 8d453937..4996dddd 100644
--- a/src/ranked_match.cc
+++ b/src/ranked_match.cc
@@ -75,12 +75,11 @@ static bool subsequence_match_smart_case(StringView str, StringView subseq, int&
index_sum = 0;
auto it = str.begin();
int index = 0;
- for (auto subseq_it = subseq.begin(); subseq_it != subseq.end();
- subseq_it = utf8::next(subseq_it, subseq.end()))
+ for (auto subseq_it = subseq.begin(); subseq_it != subseq.end();)
{
if (it == str.end())
return false;
- const Codepoint c = utf8::codepoint(subseq_it, subseq.end());
+ const Codepoint c = utf8::read_codepoint(subseq_it, subseq.end());
while (not smartcase_eq(c, utf8::read_codepoint(it, subseq.end())))
{
++index;