Virtual Destructors : pattern for declaring a derived class... "class %var% : public|protected|private %var% .."

This commit is contained in:
Daniel Marjamäki 2008-12-06 19:56:33 +00:00
parent 984cd47aac
commit b560215bc6
1 changed files with 2 additions and 2 deletions

View File

@ -670,11 +670,11 @@ void CheckClass::CheckOperatorEq1()
void CheckClass::virtualDestructor()
{
const TOKEN *derived = TOKEN::findmatch(_tokenizer->tokens(), "class %var% : public %var%");
const TOKEN *derived = TOKEN::findmatch(_tokenizer->tokens(), "class %var% : public|protected|private %var%");
while (derived)
{
// Iterate through each base class...
for ( derived = derived->tokAt(3); TOKEN::Match(derived, "public %var%"); derived = derived->tokAt(3) )
for ( derived = derived->tokAt(3); TOKEN::Match(derived, "public|protected|private %var%"); derived = derived->tokAt(3) )
{
// Name of base class..
const char *baseName[2];