Merge pull request #416 from Dmitry-Me/removeDuplicateChecks
Remove duplicate checks
This commit is contained in:
commit
5d0aa15002
|
@ -1306,9 +1306,9 @@ static void valueFlowForLoopSimplify(Token * const bodyStart, const unsigned int
|
|||
while (parent) {
|
||||
const Token * const p = parent;
|
||||
parent = parent->astParent();
|
||||
if (parent && parent->str() == ":")
|
||||
if (!parent || parent->str() == ":")
|
||||
break;
|
||||
if (parent && parent->str() == "?") {
|
||||
if (parent->str() == "?") {
|
||||
if (parent->astOperand2() != p)
|
||||
parent = NULL;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue