From 5517c22524c8b7af4edb139910655c6f78b27ca6 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 3 Feb 2015 15:01:09 +0300 Subject: [PATCH] Omit redundant token match --- lib/checkuninitvar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 0e8d07fb7..e66c9f310 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1332,7 +1332,7 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var for (const Token *tok2 = tok; tok2 && tok2 != tok->link(); tok2 = tok2->next()) { if (Token::Match(tok2, "[;{}.] %var% = - %name% ;")) varValueElse[tok2->next()->varId()] = NOT_ZERO; - if (Token::Match(tok2, "[;{}.] %var% = %num% ;")) + else if (Token::Match(tok2, "[;{}.] %var% = %num% ;")) varValueElse[tok2->next()->varId()] = (int)MathLib::toLongNumber(tok2->strAt(3)); } }