match: optimisation
This commit is contained in:
parent
ae4ab2fcb6
commit
d6d26f4705
|
@ -192,7 +192,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
||||||
if (!tok)
|
if (!tok)
|
||||||
{
|
{
|
||||||
// If we have no tokens, pattern "!!else" should return true
|
// If we have no tokens, pattern "!!else" should return true
|
||||||
if (str[1] == '!' && str[0] == '!' && strlen(str) > 2)
|
if (str[1] == '!' && str[0] == '!' && str[2] != '\0')
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue