diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 3e96306fb..bdeaf45b4 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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; diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index f3c70c5be..53a800563 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -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);