From b886702d0db337c35aeafca419afa4171019c206 Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Mon, 1 Dec 2008 20:02:39 +0000 Subject: [PATCH] Warning If minor optimizations --- CheckOther.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CheckOther.cpp b/CheckOther.cpp index 81d2f3c4d..58c530491 100644 --- a/CheckOther.cpp +++ b/CheckOther.cpp @@ -284,7 +284,8 @@ void CheckOther::WarningIf() const char *p[6] = {"==","<=",">=","!=","<",">"}; bool iscond = false; for (int i = 0; i < 6; i++) - iscond |= (strcmp(cond, p[i]) == 0); + if (iscond = (strcmp(cond, p[i]) == 0)) + break; if (!iscond) break; @@ -454,7 +455,6 @@ void CheckOther::CheckVariableScope() if ( tok2->str() == "{" ) { int _indentlevel = 0; - tok = tok2; for (tok = tok2; tok; tok = tok->next) { if ( tok->str() == "{" )