astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-04-08 20:29:52 +02:00
parent d9cbaa83d6
commit ae3e649cc4
1 changed files with 10 additions and 10 deletions

View File

@ -1928,16 +1928,16 @@ void CheckOther::checkDuplicateExpression()
continue;
for (const Token *tok = scope->classStart; tok && tok != scope->classEnd; tok = tok->next()) {
if(tok->str() == "=" && Token::Match(tok->astOperand1(), "%var%")) {
if (tok->str() == "=" && Token::Match(tok->astOperand1(), "%var%")) {
const Token * endStatement = Token::findsimplematch(tok, ";");
if(Token::Match(endStatement, "; %type% %var% ;")) {
if (Token::Match(endStatement, "; %type% %var% ;")) {
endStatement = endStatement->tokAt(4);
}
if(Token::Match(endStatement, "%var% %assign%")) {
if (Token::Match(endStatement, "%var% %assign%")) {
const Token * nextAssign = endStatement->tokAt(1);
const Token * var1 = tok->astOperand1();
const Token * var2 = nextAssign->astOperand1();
if(var1 && var2 &&
if (var1 && var2 &&
Token::Match(var1->previous(), ";|{|} %var%") &&
Token::Match(var2->previous(), ";|{|} %var%") &&
var2->valueType() && var1->valueType() &&