From f7a846e31efa5e7914d3310eab099a82df77fbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 5 Dec 2008 19:17:25 +0000 Subject: [PATCH] tokenize: Replace a complicated condition with a "Match" --- tokenize.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tokenize.cpp b/tokenize.cpp index 35916d6ec..ae5b3bca8 100644 --- a/tokenize.cpp +++ b/tokenize.cpp @@ -765,11 +765,7 @@ void Tokenizer::simplifyTokenList() } // (1-2) - if (strchr("[,(=<>",tok->aaaa0()) && - (tok->tokAt(1) && tok->tokAt(1)->isNumber()) && - strchr("+-*/",*(tok->strAt(2))) && - (tok->tokAt(3) && tok->tokAt(3)->isNumber()) && - strchr("],);=<>",*(tok->strAt(4))) ) + if (TOKEN::Match(tok, "[[,(=<>] %num% [+-*/] %num% [],);=<>]")) { int i1 = atoi(tok->strAt(1)); int i2 = atoi(tok->strAt(3));