astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-08-05 22:40:21 +02:00
parent b839ad60dd
commit 1b933f4dd1
3 changed files with 13 additions and 13 deletions

View File

@ -863,19 +863,19 @@ static std::string conditionString(bool not1, const Token *expr1, const std::str
static std::string conditionString(const Token * tok)
{
if(!tok)
if (!tok)
return "";
if(tok->isComparisonOp()) {
if (tok->isComparisonOp()) {
bool inconclusive = false;
bool not_;
std::string op, value;
const Token *expr;
if(parseComparison(tok, &not_, &op, &value, &expr, &inconclusive) && expr->isName()) {
if (parseComparison(tok, &not_, &op, &value, &expr, &inconclusive) && expr->isName()) {
return conditionString(not_, expr, op, value);
}
}
if(Token::Match(tok, "%cop%|&&|%oror%")) {
if(tok->astOperand2())
if (Token::Match(tok, "%cop%|&&|%oror%")) {
if (tok->astOperand2())
return conditionString(tok->astOperand1()) + " " + tok->str() + " " + conditionString(tok->astOperand2());
return tok->str() + "(" + conditionString(tok->astOperand1()) + ")";
@ -975,7 +975,7 @@ void CheckCondition::checkIncorrectLogicOperator()
continue;
}
if(!parseable)
if (!parseable)
continue;
if (isSameExpression(mTokenizer->isCPP(), true, comp1, comp2, mSettings->library, true))