From d3118d85c0f442871529fd149c4988f816d3bf04 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sun, 30 Aug 2009 03:25:14 +0700 Subject: [PATCH] Tokenizer::setVarId(): simplify code a bit. No functional change. --- src/tokenize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tokenize.cpp b/src/tokenize.cpp index 1b4e94c75..412c81530 100644 --- a/src/tokenize.cpp +++ b/src/tokenize.cpp @@ -937,10 +937,10 @@ void Tokenizer::setVarId() { ++_varId; - const std::string pattern(std::string(". ") + tok->strAt(2)); + const std::string pattern(std::string("%varid% . ") + tok->strAt(2)); for (Token *tok2 = tok; tok2; tok2 = tok2->next()) { - if (tok2->varId() == tok->varId() && Token::simpleMatch(tok2->next(), pattern.c_str())) + if (Token::Match(tok2, pattern.c_str(), tok->varId())) tok2->tokAt(2)->varId(_varId); } }