simplifyCalculations: Removed redundant goback variable

This commit is contained in:
Daniel Marjamäki 2018-05-14 23:06:10 +02:00
parent 29dc42ff67
commit d8622ea5f8
1 changed files with 2 additions and 6 deletions

View File

@ -1243,12 +1243,8 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
// should be moved away.
bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
{
bool ret = false, goback = false;
bool ret = false;
for (Token *tok = _tokens; tok; tok = tok->next()) {
if (goback) {
tok = tok->previous();
goback = false;
}
// Remove parentheses around variable..
// keep parentheses here: dynamic_cast<Fred *>(p);
// keep parentheses here: A operator * (int);
@ -1405,7 +1401,7 @@ bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
tok->str(result);
tok->deleteNext(2);
ret = true;
goback = true;
tok = tok->previous();
}
}
}