symbol database: get function argument count using argument list size rather than counting commas
This commit is contained in:
parent
b8cda19ca6
commit
d17a204096
|
@ -1192,24 +1192,6 @@ void SymbolDatabase::debugMessage(const Token *tok, const std::string &msg) cons
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
unsigned int Function::argCount() const
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
||||
if (argDef->link() != argDef->next())
|
||||
{
|
||||
count++;
|
||||
|
||||
for (const Token *tok = argDef->next(); tok && tok->next() && tok->next() != argDef->link(); tok = tok->next())
|
||||
{
|
||||
if (tok->str() == ",")
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
unsigned int Function::initializedArgCount() const
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
|
|
@ -337,7 +337,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
unsigned int argCount() const;
|
||||
unsigned int argCount() const
|
||||
{
|
||||
return argumentList.size();
|
||||
}
|
||||
unsigned int initializedArgCount() const;
|
||||
void addArguments(const SymbolDatabase *symbolDatabase, const Scope *scope);
|
||||
|
||||
|
|
Loading…
Reference in New Issue