astyle formatting

This commit is contained in:
Daniel Marjamäki 2018-04-08 09:25:59 +02:00
parent aed84abfd5
commit 795b9f5e0f
3 changed files with 5 additions and 5 deletions

View File

@ -585,7 +585,7 @@ void CheckCondition::multiCondition2()
} else if (isOppositeCond(false, _tokenizer->isCPP(), firstCondition, cond2, _settings->library, true)) {
if (!isAliased(vars))
oppositeInnerConditionError(firstCondition, cond2);
} else if(isSameExpression(_tokenizer->isCPP(), true, firstCondition, cond2, _settings->library, true)) {
} else if (isSameExpression(_tokenizer->isCPP(), true, firstCondition, cond2, _settings->library, true)) {
identicalInnerConditionError(firstCondition, cond2);
}
}

View File

@ -2535,9 +2535,9 @@ static void valueFlowAfterCondition(TokenList *tokenlist, SymbolDatabase* symbol
bool bail = false;
for(int i=0;i<2;i++) {
for (int i=0; i<2; i++) {
Token * startToken = startTokens[i];
if(startToken) {
if (startToken) {
std::list<ValueFlow::Value> & values = (i==0 ? true_values : false_values);
if (values.size() == 1U && Token::Match(tok, "==|!")) {
const Token *parent = tok->astParent();
@ -2558,7 +2558,7 @@ static void valueFlowAfterCondition(TokenList *tokenlist, SymbolDatabase* symbol
}
}
}
if(bail)
if (bail)
continue;
// After conditional code..

View File

@ -1878,7 +1878,7 @@ private:
check("void f1(const std::string v[10]) { if(v[0].size() > 42) if(v[1].empty()) {}} ");
ASSERT_EQUALS("", errout.str());
}
void identicalInnerCondition() {
check("void f1(int a, int b) { if(a==b) if(a==b) {}}");
ASSERT_EQUALS("[test.cpp:1] -> [test.cpp:1]: (warning) Identical inner 'if' condition is always true.\n", errout.str());