COMP: Avoid operator precedence warning

GCC warns that parens should be used for nested and/or operators.
This commit is contained in:
Brad King 2009-05-11 13:58:19 -04:00
parent 80c66c05e7
commit a045bd4c0d
1 changed files with 1 additions and 5 deletions

View File

@ -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);
}