From 742858b67ca2b2bc0a1cc37151488082c95221a9 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Mon, 10 Oct 2011 17:18:47 +0200 Subject: [PATCH] Fixed some simple errors in some old commits. --- lib/tokenize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index acf5e423f..620f3db49 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -4968,7 +4968,7 @@ void Tokenizer::simplifyDeadCode() break; --indentlevel1; } - else if (Token::Match(tok2, "%var% : ;") && !Token::Match(tok2, "case!default")) + else if (Token::Match(tok2, "%var% : ;") && !Token::Match(tok2, "case|default")) { indentlabel = indentlevel1; break; @@ -10004,7 +10004,7 @@ void Tokenizer::simplifyWhile0() // for (0) - not banal, ticket #3140 const bool for0((Token::Match(tok, "for ( %var% = %num% ; %var% < %num% ;") && tok->strAt(2) == tok->strAt(6) && tok->strAt(4) == tok->strAt(8)) || - (Token::Match(tok->tokAt(2), "%type% %var% = %num% ; %var% < %num% ;") && + (Token::Match(tok, "for ( %type% %var% = %num% ; %var% < %num% ;") && tok->strAt(3) == tok->strAt(7) && tok->strAt(5) == tok->strAt(9))); if (!while0 && !for0)