Simplify code (repair travis build)
This commit is contained in:
parent
21efa992e3
commit
7112725d38
|
@ -470,14 +470,14 @@ std::list<Token *> TemplateSimplifier::getTemplateDeclarations(Token *tokens, bo
|
||||||
tok = tok->linkAt(2);
|
tok = tok->linkAt(2);
|
||||||
|
|
||||||
if (Token::simpleMatch(tok, "template <")) {
|
if (Token::simpleMatch(tok, "template <")) {
|
||||||
Token *parmEnd = tok->next()->findClosingBracket();
|
// Some syntax checks, see #6865
|
||||||
if (!tok->tokAt(2))
|
if (!tok->tokAt(2))
|
||||||
syntaxError(tok->next());
|
syntaxError(tok->next());
|
||||||
if (tok->tokAt(2)->str()=="typename" &&
|
if (tok->strAt(2)=="typename" &&
|
||||||
(!tok->tokAt(3) || !Token::Match(tok->tokAt(3), "%name%|.")))
|
(!tok->tokAt(3) || !Token::Match(tok->tokAt(3), "%name%|.")))
|
||||||
syntaxError(tok->next());
|
syntaxError(tok->next());
|
||||||
codeWithTemplates = true;
|
codeWithTemplates = true;
|
||||||
|
Token *parmEnd = tok->next()->findClosingBracket();
|
||||||
int indentlevel = 0;
|
int indentlevel = 0;
|
||||||
for (const Token *tok2 = parmEnd; tok2; tok2 = tok2->next()) {
|
for (const Token *tok2 = parmEnd; tok2; tok2 = tok2->next()) {
|
||||||
if (tok2->str() == "(")
|
if (tok2->str() == "(")
|
||||||
|
|
Loading…
Reference in New Issue