diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index b512e0e0d..c2b357f28 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -732,7 +732,7 @@ static bool checkFunctionUsage(const std::string& name, const Scope* scope) return true; } - for (std::list::const_iterator i = scope->nestedList.cbegin(); i != scope->nestedList.end(); ++i) { + for (std::list::const_iterator i = scope->nestedList.begin(); i != scope->nestedList.end(); ++i) { if ((*i)->isClassOrStruct()) if (checkFunctionUsage(name, *i)) // Check nested classes, which can access private functions of their base return true;