checkclass: refactoring

This commit is contained in:
Daniel Marjamäki 2009-02-24 17:50:51 +00:00
parent 66c13c7173
commit 4849aaa7ee
1 changed files with 3 additions and 3 deletions

View File

@ -476,7 +476,7 @@ void CheckClass::privateFunctions()
// The class implementation must be available.. // The class implementation must be available..
const std::string classconstructor(classname + " :: " + classname); const std::string classconstructor(classname + " :: " + classname);
if (!Token::findmatch(_tokenizer->tokens(), classconstructor.c_str())) if (tok1->fileIndex()>0 && !Token::findmatch(_tokenizer->tokens(), classconstructor.c_str()))
continue; continue;
// Get private functions.. // Get private functions..
@ -549,13 +549,13 @@ void CheckClass::privateFunctions()
{ {
if (ftok->str() == "{") if (ftok->str() == "{")
++indent_level; ++indent_level;
if (ftok->str() == "}") else if (ftok->str() == "}")
{ {
if (indent_level <= 1) if (indent_level <= 1)
break; break;
--indent_level; --indent_level;
} }
if (Token::Match(ftok->next(), "(")) else if (Token::Match(ftok, "%var% ("))
{ {
// Remove function from FuncList // Remove function from FuncList
for (std::list<const Token *>::iterator it = FuncList.begin(); it != FuncList.end(); ++it) for (std::list<const Token *>::iterator it = FuncList.begin(); it != FuncList.end(); ++it)