diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 3aa5e6f6d..3dae17ab0 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3893,10 +3893,8 @@ bool CheckOther::isIdentifierObjectType(const Token * const tok) void CheckOther::checkMisusedScopedObject() { - const char localClassDefinition[] = "class|struct %var% [{:]"; bool withinFunction = false; unsigned int depth = 0; - std::string className = ""; for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { @@ -3911,17 +3909,6 @@ void CheckOther::checkMisusedScopedObject() { --depth; withinFunction &= depth > 0; - - if (tok->strAt(1) == ";" && !className.empty()) - { - isClassResults[className] = true; - className.clear(); - } - } - else if (Token::Match(tok, localClassDefinition)) - { - className = tok->strAt(1); - isClassResults.insert(std::make_pair(className, false)); } if (withinFunction