diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 3e394d443..4e72c6964 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5347,9 +5347,9 @@ Scope *Scope::findInNestedListRecursive(const std::string & name) const Function *Scope::getDestructor() const { - for (const Function &function: functionList) { - if (function.type == Function::eDestructor) - return &function; + for (const Function &f: functionList) { + if (f.type == Function::eDestructor) + return &f; } return nullptr; }