astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-06-10 21:59:24 +02:00
parent 3e856c2e03
commit b9d03d0e23
1 changed files with 3 additions and 3 deletions

View File

@ -1952,14 +1952,14 @@ void CheckOther::checkDuplicateExpression()
bool assigned = false;
const Scope * varScope = var1->scope() ? var1->scope() : &*scope;
for (const Token *assignTok = Token::findsimplematch(var2, ";"); assignTok && assignTok != varScope->bodyEnd; assignTok = assignTok->next()) {
if(Token::Match(assignTok, "%varid% = %var%", var1->varId()) && Token::Match(assignTok, "%var% = %varid%", var2->varId())) {
if (Token::Match(assignTok, "%varid% = %var%", var1->varId()) && Token::Match(assignTok, "%var% = %varid%", var2->varId())) {
assigned = true;
}
if(Token::Match(assignTok, "%varid% = %var%", var2->varId()) && Token::Match(assignTok, "%var% = %varid%", var1->varId())) {
if (Token::Match(assignTok, "%varid% = %var%", var2->varId()) && Token::Match(assignTok, "%var% = %varid%", var1->varId())) {
assigned = true;
}
}
if(!assigned)
if (!assigned)
duplicateAssignExpressionError(var1, var2);
}
}