From 9556634ee7bcb3d26ec12ecf7d4bf869eee983de Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Wed, 7 Nov 2012 18:34:25 +0100 Subject: [PATCH] Revert 1c0617c504d8bab9c4a0391c0c04bd301404f625. --- lib/templatesimplifier.cpp | 2 +- lib/tokenize.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index c3ab6d0fb..d80c68c97 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -816,7 +816,7 @@ bool TemplateSimplifier::simplifyCalculations(Token *_tokens) if (tok->isNumber()) { // Remove redundant conditions (0&&x) (1||x) if (Token::Match(tok->previous(), "[(=,] 0 &&") || - Token::Match(tok->previous(), "[(=,] 1 %oror%")) { + Token::Match(tok->previous(), "[(=,] 1 ||")) { unsigned int par = 0; const Token *tok2 = tok; for (; tok2; tok2 = tok2->next()) { diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index e2c27c856..399c4ab2d 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -5653,7 +5653,7 @@ bool Tokenizer::simplifyLogicalOperators() } else if (Token::Match(tok, "&& not|compl %var%")) { tok->next()->str(tok->next()->str() == "not" ? "!" : "~"); ret = true; - } else if (Token::Match(tok, "%oror% not|compl %var%")) { + } else if (Token::Match(tok, "|| not|compl %var%")) { tok->next()->str(tok->next()->str() == "not" ? "!" : "~"); ret = true; }