Tokenizer: Code cleanup

This commit is contained in:
Daniel Marjamäki 2018-04-29 15:05:13 +02:00
parent ff732e41ac
commit 45c4456c24
1 changed files with 1 additions and 5 deletions

View File

@ -91,12 +91,8 @@ const Token * Tokenizer::isFunctionHead(const Token *tok, const std::string &end
return nullptr;
if (tok->str() == "(")
tok = tok->link();
if (Token::Match(tok, ") )| ;|{|[")) {
if (Token::Match(tok, ") ;|{|[")) {
tok = tok->next();
if (tok->isName())
tok = tok->next();
if (tok->str() == ")")
tok = tok->next();
while (tok && tok->str() == "[" && tok->link())
tok = tok->link()->next();
return (tok && endsWith.find(tok->str()) != std::string::npos) ? tok : nullptr;