Remove useless spacing at the end of *Match strings

This commit is contained in:
Raphael Geissert 2011-02-02 09:41:43 -06:00
parent a9681ad4d1
commit cf2b6f7bc1
6 changed files with 6 additions and 6 deletions

View File

@ -302,7 +302,7 @@ static bool for_condition(const Token * const tok2, unsigned int varid, std::str
maxMinFlipped = false; maxMinFlipped = false;
max_value = tok2->strAt(2); max_value = tok2->strAt(2);
} }
else if (Token::Match(tok2, " %num% < %varid% ;", varid) || else if (Token::Match(tok2, "%num% < %varid% ;", varid) ||
Token::Match(tok2, "%num% != %varid% ; ++ %varid%", varid) || Token::Match(tok2, "%num% != %varid% ; ++ %varid%", varid) ||
Token::Match(tok2, "%num% != %varid% ; %varid% ++", varid)) Token::Match(tok2, "%num% != %varid% ; %varid% ++", varid))
{ {

View File

@ -310,7 +310,7 @@ void CheckClass::initializeVarList(const Function &func, std::list<std::string>
ftok = ftok->next(); ftok = ftok->next();
// Using the operator= function to initialize all variables.. // Using the operator= function to initialize all variables..
if (Token::simpleMatch(ftok->next(), "* this = ")) if (Token::simpleMatch(ftok->next(), "* this ="))
{ {
assignAllVar(usage); assignAllVar(usage);
break; break;

View File

@ -137,7 +137,7 @@ void CheckOther::checkSizeofForArrayParameter()
{ {
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
{ {
if (Token::Match(tok, "sizeof ( %var% )") || Token::Match(tok, "sizeof %var% ")) if (Token::Match(tok, "sizeof ( %var% )") || Token::Match(tok, "sizeof %var%"))
{ {
int tokIdx = 1; int tokIdx = 1;
if (tok->tokAt(tokIdx)->str() == "(") if (tok->tokAt(tokIdx)->str() == "(")

View File

@ -445,7 +445,7 @@ void CheckStl::erase()
break; break;
} }
if (Token::Match(tok2, "%var% = %var% . begin ( ) ; %var% != %var% . end ( ) ") && if (Token::Match(tok2, "%var% = %var% . begin ( ) ; %var% != %var% . end ( )") &&
tok2->str() == tok2->tokAt(8)->str() && tok2->str() == tok2->tokAt(8)->str() &&
tok2->tokAt(2)->str() == tok2->tokAt(10)->str()) tok2->tokAt(2)->str() == tok2->tokAt(10)->str())
{ {

View File

@ -1213,7 +1213,7 @@ const Token* skipScopeIdentifiers(const Token* tok)
{ {
ret = ret->next(); ret = ret->next();
} }
while (Token::Match(ret, "%type% :: ")) while (Token::Match(ret, "%type% ::"))
{ {
ret = ret->tokAt(2); ret = ret->tokAt(2);
} }

View File

@ -7702,7 +7702,7 @@ void Tokenizer::simplifyEnum()
lastEnumValueStart = 0; lastEnumValueStart = 0;
lastEnumValueEnd = 0; lastEnumValueEnd = 0;
} }
else if (Token::Match(tok1->previous(), ",|{ %type% = ")) else if (Token::Match(tok1->previous(), ",|{ %type% ="))
{ {
// value is specified expression // value is specified expression
enumName = tok1; enumName = tok1;