Bugfix: Use Token::Match instead of Token::simpleMatch because it's a complex pattern

This bug was in here before my recent refactoring.

(And yes, I wrote a check for cppcheck's Token::Match invocation ;))
This commit is contained in:
Thomas Jarosch 2011-10-27 16:37:03 +02:00
parent 434fb933a8
commit 22251d50bb
1 changed files with 2 additions and 2 deletions

View File

@ -5792,10 +5792,10 @@ void Tokenizer::simplifyPlatformTypes()
return;
for (Token *tok = _tokens; tok; tok = tok->next()) {
if (Token::simpleMatch(tok, "std :: size_t|ssize_t|ptrdiff_t|intptr_t|uintptr_t")) {
if (Token::Match(tok, "std :: size_t|ssize_t|ptrdiff_t|intptr_t|uintptr_t")) {
tok->deleteNext();
tok->deleteThis();
} else if (Token::simpleMatch(tok, ":: size_t|ssize_t|ptrdiff_t|intptr_t|uintptr_t")) {
} else if (Token::Match(tok, ":: size_t|ssize_t|ptrdiff_t|intptr_t|uintptr_t")) {
tok->deleteThis();
}