Refactorization: Removed whitespaces at the end of Token::Match patterns

This commit is contained in:
PKEuS 2014-12-27 11:09:54 +01:00
parent 990d14f3e2
commit 8b59c39c42
3 changed files with 5 additions and 5 deletions

View File

@ -999,11 +999,11 @@ void CheckBufferOverrun::checkScope(const Token *tok, const ArrayInfo &arrayInfo
//---------------------------------------------------------------------------
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);
int i = 1;
for (;;) {
if (Token::Match(tok->next(), "[ %num% ] ")) {
if (Token::Match(tok->next(), "[ %num% ]")) {
i++;
tok = tok->tokAt(4);
} else

View File

@ -502,7 +502,7 @@ void CheckNullPointer::nullPointerDefaultArgument()
}
if (!tok)
break;
} else if (Token::simpleMatch(tok, "if ( ")) {
} else if (Token::simpleMatch(tok, "if (")) {
bool dependsOnPointer = false;
const Token *endOfCondition = tok->next()->link();
if (!endOfCondition)

View File

@ -847,7 +847,7 @@ void CheckStl::if_find()
else if (Token::Match(decl, "%type% >")) {
decl = decl->tokAt(2);
if (warning && (Token::Match(decl, "* &| %varid%", varid) ||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid)))
Token::Match(decl, "&| %varid% [ ]| %any% ]|", varid)))
if_findError(tok, false);
}
@ -858,7 +858,7 @@ void CheckStl::if_find()
else if (performance && var->isStlStringType()) {
decl = decl->next();
if (Token::Match(decl, "* &| %varid%", varid) ||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid))
Token::Match(decl, "&| %varid% [ ]| %any% ]|", varid))
if_findError(tok, true);
}
}