Refactorization: Removed whitespaces at the end of Token::Match patterns
This commit is contained in:
parent
990d14f3e2
commit
8b59c39c42
|
@ -999,11 +999,11 @@ void CheckBufferOverrun::checkScope(const Token *tok, const ArrayInfo &arrayInfo
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
bool CheckBufferOverrun::isArrayOfStruct(const Token* tok, int &position)
|
bool CheckBufferOverrun::isArrayOfStruct(const Token* tok, int &position)
|
||||||
{
|
{
|
||||||
if (Token::Match(tok->next(), "%var% [ %num% ] ")) {
|
if (Token::Match(tok->next(), "%var% [ %num% ]")) {
|
||||||
tok = tok->tokAt(4);
|
tok = tok->tokAt(4);
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (Token::Match(tok->next(), "[ %num% ] ")) {
|
if (Token::Match(tok->next(), "[ %num% ]")) {
|
||||||
i++;
|
i++;
|
||||||
tok = tok->tokAt(4);
|
tok = tok->tokAt(4);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -502,7 +502,7 @@ void CheckNullPointer::nullPointerDefaultArgument()
|
||||||
}
|
}
|
||||||
if (!tok)
|
if (!tok)
|
||||||
break;
|
break;
|
||||||
} else if (Token::simpleMatch(tok, "if ( ")) {
|
} else if (Token::simpleMatch(tok, "if (")) {
|
||||||
bool dependsOnPointer = false;
|
bool dependsOnPointer = false;
|
||||||
const Token *endOfCondition = tok->next()->link();
|
const Token *endOfCondition = tok->next()->link();
|
||||||
if (!endOfCondition)
|
if (!endOfCondition)
|
||||||
|
|
|
@ -847,7 +847,7 @@ void CheckStl::if_find()
|
||||||
else if (Token::Match(decl, "%type% >")) {
|
else if (Token::Match(decl, "%type% >")) {
|
||||||
decl = decl->tokAt(2);
|
decl = decl->tokAt(2);
|
||||||
if (warning && (Token::Match(decl, "* &| %varid%", varid) ||
|
if (warning && (Token::Match(decl, "* &| %varid%", varid) ||
|
||||||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid)))
|
Token::Match(decl, "&| %varid% [ ]| %any% ]|", varid)))
|
||||||
if_findError(tok, false);
|
if_findError(tok, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,7 +858,7 @@ void CheckStl::if_find()
|
||||||
else if (performance && var->isStlStringType()) {
|
else if (performance && var->isStlStringType()) {
|
||||||
decl = decl->next();
|
decl = decl->next();
|
||||||
if (Token::Match(decl, "* &| %varid%", varid) ||
|
if (Token::Match(decl, "* &| %varid%", varid) ||
|
||||||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid))
|
Token::Match(decl, "&| %varid% [ ]| %any% ]|", varid))
|
||||||
if_findError(tok, true);
|
if_findError(tok, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue