Removed unnecessary string comparison in Tokenizer::simplifyKnownVariablesSimplify.

This commit is contained in:
Simon Martin 2015-05-23 22:54:41 +02:00
parent 1eba077c24
commit c58fab07d6
1 changed files with 4 additions and 4 deletions

View File

@ -6822,10 +6822,10 @@ bool Tokenizer::simplifyKnownVariablesSimplify(Token **tok2, Token *tok3, unsign
}
// Delete pointer alias
if (pointeralias && tok3->str() == "delete" &&
(Token::Match(tok3, "delete %varid% ;", varid) ||
Token::Match(tok3, "delete [ ] %varid%", varid))) {
tok3 = (tok3->next() && tok3->next()->str() == "[") ? tok3->tokAt(3) : tok3->next();
if (pointeralias && (tok3->str() == "delete") && tok3->next() &&
(Token::Match(tok3->next(), "%varid% ;", varid) ||
Token::Match(tok3->next(), "[ ] %varid%", varid))) {
tok3 = (tok3->next()->str() == "[") ? tok3->tokAt(3) : tok3->next();
tok3->str(value);
tok3->varId(valueVarId);
ret = true;