Code cleanup. Fix gcc warning.

This commit is contained in:
Daniel Marjamäki 2020-11-18 15:43:09 +01:00
parent 9029fff59d
commit 3c207da910
1 changed files with 1 additions and 3 deletions

View File

@ -188,11 +188,9 @@ struct ReverseTraversal {
break;
valueFlowGenericForward(condTok, analyzer, settings);
}
Token* thenEnd = nullptr;
Token* elseEnd = nullptr;
Token* thenEnd;
const bool hasElse = Token::simpleMatch(tok->link()->tokAt(-2), "} else {");
if (hasElse) {
elseEnd = tok;
thenEnd = tok->link()->tokAt(-2);
} else {
thenEnd = tok;