Prefer pre-increment/decrement operators in for loops

This commit is contained in:
Rangi42
2025-07-24 18:08:17 -04:00
parent c6d0e8de63
commit d6a28a6259
15 changed files with 48 additions and 48 deletions

View File

@@ -1068,7 +1068,7 @@ static bool isValidDigit(char c) {
}
static bool checkDigitErrors(char const *digits, size_t n, char const *type) {
for (size_t i = 0; i < n; i++) {
for (size_t i = 0; i < n; ++i) {
char c = digits[i];
if (!isValidDigit(c)) {
@@ -1081,7 +1081,7 @@ static bool checkDigitErrors(char const *digits, size_t n, char const *type) {
return false;
}
for (size_t j = i + 1; j < n; j++) {
for (size_t j = i + 1; j < n; ++j) {
if (c == digits[j]) {
error("Repeated digit for %s constant %s", type, printChar(c));
return false;