From 52e16454faf8c90293e71f1782bd5a10215ca799 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Wed, 13 Oct 2010 20:48:37 +1100 Subject: [PATCH] Removed redundant code. localClassDefinition is no longer required due to improved isIdentifierObjectType() in commit fbd3d92. --- lib/checkother.cpp | 13 ------------- 1 file changed, 13 deletions(-) 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