Visitar URL original
Fixed -Wshadow warning. (#186) · versat/simplecpp@1bc600b · GitHub
Skip to content

Commit 1bc600b

Browse files
orbitcowboydanmar
authored andcommitted
Fixed -Wshadow warning. (cppcheck-opensource#186)
* Fixed -Wshadow warning. * Updated local variable name to 'alternativeOp'
1 parent 24db46d commit 1bc600b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎simplecpp.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,15 +1026,15 @@ void simplecpp::TokenList::constFoldBitwise(Token *tok)
10261026
{
10271027
Token * const tok1 = tok;
10281028
for (const char *op = "&^|"; *op; op++) {
1029-
const std::string* altop;
1029+
const std::string* alternativeOp;
10301030
if (*op == '&')
1031-
altop = &BITAND;
1031+
alternativeOp = &BITAND;
10321032
else if (*op == '|')
1033-
altop = &BITOR;
1033+
alternativeOp = &BITOR;
10341034
else
1035-
altop = &XOR;
1035+
alternativeOp = &XOR;
10361036
for (tok = tok1; tok && tok->op != ')'; tok = tok->next) {
1037-
if (tok->op != *op && !isAlternativeBinaryOp(tok, *altop))
1037+
if (tok->op != *op && !isAlternativeBinaryOp(tok, *alternativeOp))
10381038
continue;
10391039
if (!tok->previous || !tok->previous->number)
10401040
continue;

0 commit comments

Comments
 (0)