Fixed #3778: Added missing function Function::getArgumentVar
This commit is contained in:
parent
04704ac5fa
commit
aec57db9b2
|
@ -1666,6 +1666,17 @@ bool Function::isImplicitlyVirtual_rec(const Scope* scope, bool& safe) const
|
|||
return false;
|
||||
}
|
||||
|
||||
const Variable* Function::getArgumentVar(unsigned int num) const
|
||||
{
|
||||
for (std::list<Variable>::const_iterator i = argumentList.begin(); i != argumentList.end(); ++i) {
|
||||
if (i->index() == num)
|
||||
return(&*i);
|
||||
else if (i->index() > num)
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -384,6 +384,8 @@ public:
|
|||
std::size_t argCount() const {
|
||||
return argumentList.size();
|
||||
}
|
||||
/** @brief get a pointer to the variable instance associated with the given argument number */
|
||||
const Variable* getArgumentVar(unsigned int num) const;
|
||||
unsigned int initializedArgCount() const;
|
||||
void addArguments(const SymbolDatabase *symbolDatabase, const Scope *scope);
|
||||
/** @brief check if this function is virtual in the base classes */
|
||||
|
|
Loading…
Reference in New Issue