Skip to content

Commit 03529eb

Browse files
committed
fix: use unsigned literals and cast explicitly
1 parent bdf4865 commit 03529eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scorer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ Score scoreConsecutives(const CandidateString &subject, const CandidateString &s
406406
// Fast path so we don't compute expensive pattern score on them.
407407
// Acronym should be addressed with acronym context bonus instead of consecutive.
408408
if (sz == 1u) {
409-
return 1 + 2 * sameCase;
409+
return static_cast<Score>(1u + 2u * sameCase);
410410
}
411411

412412
return scorePattern(sz, query_size, sameCase, startOfWord, isWordEnd(i, subject, subject_lw, subject_size));

0 commit comments

Comments
 (0)