Use 'simple' matching with normal patterns.

This commit is contained in:
Edoardo Prezioso 2012-12-31 13:30:06 +01:00
parent 676b5a15a6
commit 6612952dd4
1 changed files with 2 additions and 2 deletions

View File

@ -2648,7 +2648,7 @@ static bool isInitList(const Token *tok)
while (Token::Match(tok, ") , %var% ("))
tok = tok->linkAt(3);
return Token::Match(tok, ") {");
return Token::simpleMatch(tok, ") {");
}
void Tokenizer::setVarId()
@ -6615,7 +6615,7 @@ bool Tokenizer::simplifyRedundantParenthesis()
while (Token::Match(tok->previous(), "[{([,:] ( !!{") &&
Token::Match(tok->link(), ") [;,])]") &&
!Token::findmatch(tok, ",",tok->link())) {
!Token::findsimplematch(tok, ",", tok->link())) {
// We have "( ... )", remove the parenthesis
tok->link()->deleteThis();
tok->deleteThis();