astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-08-23 06:06:58 +02:00
parent 799601c02e
commit 4d0262fd0a
1 changed files with 2 additions and 2 deletions

View File

@ -466,7 +466,7 @@ static const Token * getIteratorExpression(const Token * tok)
const Token *iter1 = getIteratorExpression(tok->astOperand1()); const Token *iter1 = getIteratorExpression(tok->astOperand1());
if (iter1) if (iter1)
return iter1; return iter1;
if(tok->str() == "(") if (tok->str() == "(")
return nullptr; return nullptr;
const Token *iter2 = getIteratorExpression(tok->astOperand2()); const Token *iter2 = getIteratorExpression(tok->astOperand2());
if (iter2) if (iter2)
@ -486,7 +486,7 @@ void CheckStl::mismatchingContainers()
const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase(); const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase();
for (const Scope * scope : symbolDatabase->functionScopes) { for (const Scope * scope : symbolDatabase->functionScopes) {
for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) { for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) {
if(Token::Match(tok, "%comp%|-")) { if (Token::Match(tok, "%comp%|-")) {
const Token * iter1 = getIteratorExpression(tok->astOperand1()); const Token * iter1 = getIteratorExpression(tok->astOperand1());
const Token * iter2 = getIteratorExpression(tok->astOperand2()); const Token * iter2 = getIteratorExpression(tok->astOperand2());
if (iter1 && iter2 && !isSameExpression(true, false, iter1, iter2, mSettings->library, false)) { if (iter1 && iter2 && !isSameExpression(true, false, iter1, iter2, mSettings->library, false)) {