astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-10-21 20:28:46 +02:00
parent edde0eedaa
commit 64fbffc90d
3 changed files with 11 additions and 11 deletions

View File

@ -599,9 +599,9 @@ bool isConstExpression(const Token *tok, const Library& library, bool pure, bool
}
if (tok->tokType() == Token::eIncDecOp)
return false;
if(tok->isAssignmentOp())
if (tok->isAssignmentOp())
return false;
if(isLikelyStreamRead(cpp, tok))
if (isLikelyStreamRead(cpp, tok))
return false;
// bailout when we see ({..})
if (tok->str() == "{")

View File

@ -1237,20 +1237,20 @@ void CheckCondition::clarifyConditionError(const Token *tok, bool assign, bool b
static bool isConstVarExpression(const Token * tok)
{
if(!tok)
if (!tok)
return false;
if(Token::Match(tok, "%cop%")) {
if(tok->astOperand1() && !isConstVarExpression(tok->astOperand1()))
if (Token::Match(tok, "%cop%")) {
if (tok->astOperand1() && !isConstVarExpression(tok->astOperand1()))
return false;
if(tok->astOperand2() && !isConstVarExpression(tok->astOperand2()))
if (tok->astOperand2() && !isConstVarExpression(tok->astOperand2()))
return false;
return true;
}
if(Token::Match(tok, "%bool%|%num%|%str%|%char%|nullptr|NULL"))
if (Token::Match(tok, "%bool%|%num%|%str%|%char%|nullptr|NULL"))
return true;
if(tok->isEnumerator())
if (tok->isEnumerator())
return true;
if(tok->variable())
if (tok->variable())
return tok->variable()->isConst();
return false;
}