Simplify code (repair travis build)

This commit is contained in:
Alexander Mai 2015-10-18 16:04:49 +02:00
parent 21efa992e3
commit 7112725d38
1 changed files with 3 additions and 3 deletions

View File

@ -470,14 +470,14 @@ std::list<Token *> TemplateSimplifier::getTemplateDeclarations(Token *tokens, bo
tok = tok->linkAt(2);
if (Token::simpleMatch(tok, "template <")) {
Token *parmEnd = tok->next()->findClosingBracket();
// Some syntax checks, see #6865
if (!tok->tokAt(2))
syntaxError(tok->next());
if (tok->tokAt(2)->str()=="typename" &&
if (tok->strAt(2)=="typename" &&
(!tok->tokAt(3) || !Token::Match(tok->tokAt(3), "%name%|.")))
syntaxError(tok->next());
codeWithTemplates = true;
Token *parmEnd = tok->next()->findClosingBracket();
int indentlevel = 0;
for (const Token *tok2 = parmEnd; tok2; tok2 = tok2->next()) {
if (tok2->str() == "(")