Skip to content

Commit 87a5158

Browse files
committed
Fix loop counter -> loop bound
1 parent 0f998ea commit 87a5158

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/misra/test/rules/RULE-9-5-1/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ int main() {
208208
int *m = &k;
209209
}
210210

211-
for (int i = j; i < k; i += l) { // COMPLIANT: The loop counter is taken
211+
for (int i = j; i < k; i += l) { // COMPLIANT: The loop bound is taken
212212
// as a const reference
213213
const int &m = k;
214214
}
215215

216-
for (int i = j; i < k; i += l) { // COMPLIANT: The loop counter is taken
216+
for (int i = j; i < k; i += l) { // COMPLIANT: The loop bound is taken
217217
// as a const pointer
218218
const int *m = &k;
219219
}

0 commit comments

Comments
 (0)