Skip to content

Commit ae3e649

Browse files
committed
astyle formatting
[ci skip]
1 parent d9cbaa8 commit ae3e649

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

lib/checkother.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,19 +1928,19 @@ void CheckOther::checkDuplicateExpression()
19281928
continue;
19291929

19301930
for (const Token *tok = scope->classStart; tok && tok != scope->classEnd; tok = tok->next()) {
1931-
if(tok->str() == "=" && Token::Match(tok->astOperand1(), "%var%")) {
1931+
if (tok->str() == "=" && Token::Match(tok->astOperand1(), "%var%")) {
19321932
const Token * endStatement = Token::findsimplematch(tok, ";");
1933-
if(Token::Match(endStatement, "; %type% %var% ;")) {
1933+
if (Token::Match(endStatement, "; %type% %var% ;")) {
19341934
endStatement = endStatement->tokAt(4);
19351935
}
1936-
if(Token::Match(endStatement, "%var% %assign%")) {
1936+
if (Token::Match(endStatement, "%var% %assign%")) {
19371937
const Token * nextAssign = endStatement->tokAt(1);
19381938
const Token * var1 = tok->astOperand1();
19391939
const Token * var2 = nextAssign->astOperand1();
1940-
if(var1 && var2 &&
1940+
if (var1 && var2 &&
19411941
Token::Match(var1->previous(), ";|{|} %var%") &&
19421942
Token::Match(var2->previous(), ";|{|} %var%") &&
1943-
var2->valueType() && var1->valueType() &&
1943+
var2->valueType() && var1->valueType() &&
19441944
var2->valueType()->originalTypeName == var1->valueType()->originalTypeName &&
19451945
var2->valueType()->pointer == var1->valueType()->pointer &&
19461946
var2->valueType()->constness == var1->valueType()->constness &&
@@ -2020,11 +2020,11 @@ void CheckOther::duplicateAssignExpressionError(const Token *tok1, const Token *
20202020
{
20212021
const std::list<const Token *> toks = make_container< std::list<const Token *> >() << tok2 << tok1;
20222022

2023-
reportError(toks, Severity::style, "duplicateAssignExpression",
2024-
"Same expression used in consecutive assignments of '" + tok1->str() + "' and '" + tok2->str() + "'.\n"
2025-
"Finding variables '" + tok1->str() + "' and '" + tok2->str() + "' that are assigned the same expression "
2026-
"is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to "
2027-
"determine if it is correct.", CWE398, false);
2023+
reportError(toks, Severity::style, "duplicateAssignExpression",
2024+
"Same expression used in consecutive assignments of '" + tok1->str() + "' and '" + tok2->str() + "'.\n"
2025+
"Finding variables '" + tok1->str() + "' and '" + tok2->str() + "' that are assigned the same expression "
2026+
"is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to "
2027+
"determine if it is correct.", CWE398, false);
20282028
}
20292029

20302030
void CheckOther::duplicateExpressionTernaryError(const Token *tok)

0 commit comments

Comments
 (0)