refactoring, use early return
This commit is contained in:
parent
32fe0aba41
commit
ea598d5284
|
@ -3001,7 +3001,9 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
|
||||||
{
|
{
|
||||||
// check for non-empty argument list "( ... )"
|
// check for non-empty argument list "( ... )"
|
||||||
const Token * start = arg ? arg : argDef;
|
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;
|
unsigned int count = 0;
|
||||||
|
|
||||||
for (const Token* tok = start->next(); tok; tok = tok->next()) {
|
for (const Token* tok = start->next(); tok; tok = tok->next()) {
|
||||||
|
@ -3093,7 +3095,6 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
|
||||||
if (tok->str() == "=")
|
if (tok->str() == "=")
|
||||||
initArgCount++;
|
initArgCount++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Function::isImplicitlyVirtual(bool defaultVal) const
|
bool Function::isImplicitlyVirtual(bool defaultVal) const
|
||||||
|
|
Loading…
Reference in New Issue