Skip to content

Commit eb2ca99

Browse files
committed
chore: use better names for size variables
1 parent cde3e1e commit eb2ca99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/path_scorer.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,20 @@ Score getExtensionScore(const CandidateString &candidate, const CandidateString
153153
return 0;// (note that startPos >= -1)
154154
}
155155

156-
int n = ext.size();
156+
int ext_size = ext.size();
157157
auto m = endPos - pos;
158158

159159
// n contain the smallest of both extension length, m the largest.
160-
if (m < n) {
161-
n = m;
160+
if (m < ext_size) {
161+
ext_size = m;
162162
m = ext.size();
163163
}
164164

165165
//place cursor after dot & count number of matching characters in extension
166166
pos++;
167167
assert(pos >= 1u);
168168
auto matched = 0;
169-
while (matched < n) {
169+
while (matched < ext_size) {
170170
assert(matched >= 0);// fuzz: if n==0, does not enter while and matched==0
171171
if (candidate[pos + matched] != ext[matched]) {// TODO candidate upper bound
172172
break;

0 commit comments

Comments
 (0)