use early continue

This commit is contained in:
Daniel Marjamäki 2017-12-27 22:29:45 +01:00
parent 469cb7e6df
commit 42bcb6d417
1 changed files with 24 additions and 24 deletions

View File

@ -471,7 +471,8 @@ std::list<TemplateSimplifier::TokenAndName> TemplateSimplifier::getTemplateDecla
std::list<TokenAndName> declarations; std::list<TokenAndName> declarations;
for (Token *tok = tokens; tok; tok = tok->next()) { for (Token *tok = tokens; tok; tok = tok->next()) {
setScopeInfo(tok, &scopeInfo); setScopeInfo(tok, &scopeInfo);
if (Token::simpleMatch(tok, "template <")) { if (!Token::simpleMatch(tok, "template <"))
continue;
// Some syntax checks, see #6865 // Some syntax checks, see #6865
if (!tok->tokAt(2)) if (!tok->tokAt(2))
syntaxError(tok->next()); syntaxError(tok->next());
@ -497,7 +498,6 @@ std::list<TemplateSimplifier::TokenAndName> TemplateSimplifier::getTemplateDecla
} }
} }
} }
}
return declarations; return declarations;
} }