From 0a3959f20107f8be7e1bc2bfd0026e9bfce98c2f Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 2 Dec 2015 17:28:21 +0300 Subject: [PATCH] Remove duplicate check --- lib/checkother.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 7d58a97c9..29f1e68af 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -137,12 +137,13 @@ void CheckOther::clarifyCalculation() for (; tok2; tok2 = tok2->next()) { if (tok2->str() == "(") tok2 = tok2->link(); - else if (tok2->str() == ")" || tok2->str() == "?") + else if (tok2->str() == ")") break; + else if (tok2->str() == "?") { + clarifyCalculationError(tok, tok->astOperand1()->str()); + break; + } } - - if (tok2 && tok2->str() == "?") - clarifyCalculationError(tok, tok->astOperand1()->str()); } } }