Removed redundant code.

localClassDefinition is no longer required due to improved isIdentifierObjectType() in commit fbd3d92.
This commit is contained in:
Pete Johns 2010-10-13 20:48:37 +11:00
parent fbd3d92aa9
commit 52e16454fa
1 changed files with 0 additions and 13 deletions

View File

@ -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