Small cleanups in the code

This commit is contained in:
Daniel Marjamäki 2014-04-03 06:37:02 +02:00
parent a115bbbbb5
commit 9f80f3a4e8
1 changed files with 2 additions and 2 deletions

View File

@ -2550,7 +2550,7 @@ void CheckOther::checkDuplicateIf()
std::string expression = tok->tokAt(2)->stringifyList(tok->next()->link());
// save the expression and its location
expressionMap.insert(std::make_pair(expression, tok));
expressionMap[expression] = tok;
// find the next else if (...) statement
const Token *tok1 = scope->classEnd;
@ -2574,7 +2574,7 @@ void CheckOther::checkDuplicateIf()
// not a duplicate expression so save it and its location
else
expressionMap.insert(std::make_pair(expression, tok1->next()));
expressionMap[expression] = tok1->next();
// find the next else if (...) statement
tok1 = tok1->linkAt(conditionIndex)->next()->link();