Skip to content

Commit 22c0181

Browse files
dmcppcheckclaude
andcommitted
Fix clang-tidy misc-const-correctness warnings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3df9500 commit 22c0181

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎simplecpp.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ static bool isAlternativeUnaryOp(const simplecpp::Token *tok, const std::string
217217
if (!tok->name || tok->str() != alt)
218218
return false;
219219
// a unary operator comes first or after another operator, but not after an operand
220-
const simplecpp::Token *prev = tok->previous;
220+
const simplecpp::Token * const prev = tok->previous;
221221
if (prev && (isValue(prev) || prev->op == ')' || (prev->name && !isAlternativeOpName(prev))))
222222
return false;
223223
// it is followed by the start of an operand
224-
const simplecpp::Token *next = tok->next;
224+
const simplecpp::Token * const next = tok->next;
225225
return next && (next->name || isValue(next) || next->isOneOf("(!~+-"));
226226
}
227227

0 commit comments

Comments
 (0)