Refactoring TemplateSimplifier::simplifyCalculations, Token::Match patterns
This commit is contained in:
parent
c1ea873e1c
commit
da87fdbb90
|
@ -1095,11 +1095,9 @@ bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
|
|||
tok = tok->previous();
|
||||
tok->deleteNext(2);
|
||||
ret = true;
|
||||
} else if (Token::Match(tok->previous(), "[=[(,] 0 * %name% ,|]|)|;|=|%cop%") ||
|
||||
Token::Match(tok->previous(), "[=[(,] 0 * %num% ,|]|)|;|%op%") ||
|
||||
} else if (Token::Match(tok->previous(), "[=[(,] 0 * %name%|%num% ,|]|)|;|=|%cop%") ||
|
||||
Token::Match(tok->previous(), "[=[(,] 0 * (") ||
|
||||
Token::Match(tok->previous(), "return|case 0 *|&& %name% ,|:|;|=|%cop%") ||
|
||||
Token::Match(tok->previous(), "return|case 0 *|&& %num% ,|:|;|%op%") ||
|
||||
Token::Match(tok->previous(), "return|case 0 *|&& %name%|%num% ,|:|;|=|%cop%") ||
|
||||
Token::Match(tok->previous(), "return|case 0 *|&& (")) {
|
||||
tok->deleteNext();
|
||||
if (tok->next()->str() == "(")
|
||||
|
|
Loading…
Reference in New Issue