Tokenizer: simplify DECLARE_DYNAMIC and DECLARE_DYNCREATE

This commit is contained in:
Robert Reif 2010-08-22 09:38:05 +02:00 committed by Daniel Marjamäki
parent ac9078857e
commit 77d634127c
2 changed files with 10 additions and 7 deletions

View File

@ -8065,13 +8065,6 @@ void Tokenizer::simplifyBuiltinExpect()
tok->deleteNext();
tok->deleteNext();
}
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC ( %any% )"))
{
tok->deleteNext();
tok->deleteNext();
tok->deleteNext();
tok->deleteNext();
}
}
}
@ -8087,6 +8080,13 @@ void Tokenizer::simplifyMicrosoftMFC()
tok->deleteNext();
tok->deleteNext();
}
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC|DECLARE_DYNCREATE ( %any% )"))
{
tok->deleteNext();
tok->deleteNext();
tok->deleteNext();
tok->deleteNext();
}
}
}

View File

@ -4413,6 +4413,9 @@ private:
const char code2[] = "class MyDialog : public CDialog { DECLARE_DYNAMIC(MyDialog) private: CString text; };";
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code2,false));
const char code3[] = "class MyDialog : public CDialog { DECLARE_DYNCREATE(MyDialog) private: CString text; };";
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code3,false));
}
};