Virtual Destructor : Minor optimization

This commit is contained in:
Nicolas Le Cam 2008-12-08 14:08:36 +00:00
parent b3d7ef73a6
commit 1d4816dbab
1 changed files with 2 additions and 5 deletions

View File

@ -686,8 +686,8 @@ void CheckClass::virtualDestructor()
{
const char pattern_classdecl[] = "class %var% : %var%";
const TOKEN *derived = TOKEN::findmatch(_tokenizer->tokens(), pattern_classdecl);
while (derived)
const TOKEN *derived = _tokenizer->tokens();
while ((derived = TOKEN::findmatch(derived, pattern_classdecl)) != NULL)
{
// Iterate through each base class...
derived = derived->tokAt(3);
@ -739,9 +739,6 @@ void CheckClass::virtualDestructor()
_errorLogger->reportErr(errmsg.str());
}
}
// Goto next class
derived = TOKEN::findmatch(derived, pattern_classdecl);
}
}
//---------------------------------------------------------------------------