Revert "tokenlist::iscast(): save a few pointer dereferences."
This reverts commit e187fdb696
.
This commit is contained in:
parent
d3b231214d
commit
0771a81969
|
@ -391,11 +391,10 @@ static bool iscast(const Token *tok)
|
||||||
if (!Token::Match(tok, "( ::| %name%"))
|
if (!Token::Match(tok, "( ::| %name%"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const Token *prevTok = tok->previous();
|
if (tok->previous() && tok->previous()->isName() && tok->previous()->str() != "return")
|
||||||
if (prevTok && prevTok->isName() && prevTok->str() != "return")
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Token::simpleMatch(prevTok, ">") && prevTok->link())
|
if (Token::simpleMatch(tok->previous(), ">") && tok->previous()->link())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Token::Match(tok, "( (| typeof (") && Token::Match(tok->link(), ") %num%"))
|
if (Token::Match(tok, "( (| typeof (") && Token::Match(tok->link(), ") %num%"))
|
||||||
|
@ -407,7 +406,7 @@ static bool iscast(const Token *tok)
|
||||||
if (Token::Match(tok->link(), ") %cop%") && !Token::Match(tok->link(), ") [&*+-~]"))
|
if (Token::Match(tok->link(), ") %cop%") && !Token::Match(tok->link(), ") [&*+-~]"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Token::Match(prevTok, "= ( %name% ) {") && tok->next()->varId() == 0)
|
if (Token::Match(tok->previous(), "= ( %name% ) {") && tok->next()->varId() == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
bool type = false;
|
bool type = false;
|
||||||
|
|
Loading…
Reference in New Issue