simplifyCalculations: Removed redundant goback variable
This commit is contained in:
parent
29dc42ff67
commit
d8622ea5f8
|
@ -1243,12 +1243,8 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
|
||||||
// should be moved away.
|
// should be moved away.
|
||||||
bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
|
bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
|
||||||
{
|
{
|
||||||
bool ret = false, goback = false;
|
bool ret = false;
|
||||||
for (Token *tok = _tokens; tok; tok = tok->next()) {
|
for (Token *tok = _tokens; tok; tok = tok->next()) {
|
||||||
if (goback) {
|
|
||||||
tok = tok->previous();
|
|
||||||
goback = false;
|
|
||||||
}
|
|
||||||
// Remove parentheses around variable..
|
// Remove parentheses around variable..
|
||||||
// keep parentheses here: dynamic_cast<Fred *>(p);
|
// keep parentheses here: dynamic_cast<Fred *>(p);
|
||||||
// keep parentheses here: A operator * (int);
|
// keep parentheses here: A operator * (int);
|
||||||
|
@ -1405,7 +1401,7 @@ bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
|
||||||
tok->str(result);
|
tok->str(result);
|
||||||
tok->deleteNext(2);
|
tok->deleteNext(2);
|
||||||
ret = true;
|
ret = true;
|
||||||
goback = true;
|
tok = tok->previous();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue