match: optimisation

This commit is contained in:
Leandro Penz 2009-01-10 20:40:05 +00:00
parent 1e6b54b2c5
commit 12a7d1df4b
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
}
// Parse "not" options. Token can be anything except the given one
else if (str[1] == '!' && str[0] == '!' && strlen(str) > 2)
else if (str[1] == '!' && str[0] == '!' && str[2] != '\0')
{
if (strcmp(tok->aaaa(), &(str[2])) == 0)
return false;