From cd4f3cf8db2f22ca547ccf2d217ab5a120cbf101 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 4 Sep 2015 10:42:26 +0300 Subject: [PATCH] Treat checks as mutually exclusive --- lib/checkother.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 14bc92ea2..bafcf79b5 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -850,10 +850,10 @@ void CheckOther::checkSuspiciousCaseInSwitch() break; if (Token::Match(tok2, "[;}{]")) break; + if (tok2->str() == "?") finding = nullptr; - - if (Token::Match(tok2, "&&|%oror%")) + else if (Token::Match(tok2, "&&|%oror%")) finding = tok2; } if (finding)