diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 6e46a902b..23e0193b1 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -873,11 +873,12 @@ void CheckClass::checkMemsetType(const Scope *start, const Token *tok, const Sco std::list::const_iterator func; for (func = type->functionList.begin(); func != type->functionList.end(); ++func) { - if (func->isVirtual) + if (func->isVirtual) { if (allocation) mallocOnClassError(tok, tok->str(), type->classDef, "virtual method"); else memsetError(tok, tok->str(), "virtual method", type->classDef->str()); + } } // Warn if type is a class or struct that contains any std::* variables