From a045bd4c0d08cf2a17db8b9da538aba2f4b18827 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 11 May 2009 13:58:19 -0400 Subject: [PATCH] COMP: Avoid operator precedence warning GCC warns that parens should be used for nested and/or operators. --- Source/cmCTest.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 7f0702c83..0cd5d5637 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1691,11 +1691,7 @@ bool cmCTest::AddTestsForDashboardType(std::string &targ) bool cmCTest::CheckArgument(const std::string& arg, const char* varg1, const char* varg2) { - if ( varg1 && arg == varg1 || varg2 && arg == varg2 ) - { - return true; - } - return false; + return (varg1 && arg == varg1) || (varg2 && arg == varg2); }