refactoring, use early return

This commit is contained in:
Daniel Marjamäki 2017-07-09 13:09:36 +02:00
parent 32fe0aba41
commit ea598d5284
1 changed files with 81 additions and 80 deletions

View File

@ -3001,7 +3001,9 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
{
// check for non-empty argument list "( ... )"
const Token * start = arg ? arg : argDef;
if (start && start->link() != start->next() && !Token::simpleMatch(start, "( void )")) {
if (!(start && start->link() != start->next() && !Token::simpleMatch(start, "( void )")))
return;
unsigned int count = 0;
for (const Token* tok = start->next(); tok; tok = tok->next()) {
@ -3094,7 +3096,6 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
initArgCount++;
}
}
}
bool Function::isImplicitlyVirtual(bool defaultVal) const
{