|
@@ -222,7 +222,7 @@ bool cmConditionEvaluator::GetBooleanValue(
|
|
|
double d = strtod(arg.c_str(), &end);
|
|
|
if (*end == '\0') {
|
|
|
// The whole string is a number. Use C conversion to bool.
|
|
|
- return d ? true : false;
|
|
|
+ return static_cast<bool>(d);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -444,7 +444,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
|
|
if (this->IsKeyword(keyCOMMAND, *arg) && argP1 != newArgs.end()) {
|
|
|
cmCommand* command =
|
|
|
this->Makefile.GetState()->GetCommand(argP1->c_str());
|
|
|
- this->HandlePredicate(command ? true : false, reducible, arg, newArgs,
|
|
|
+ this->HandlePredicate(command != CM_NULLPTR, reducible, arg, newArgs,
|
|
|
argP1, argP2);
|
|
|
}
|
|
|
// does a policy exist
|
|
@@ -456,7 +456,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
|
|
// does a target exist
|
|
|
if (this->IsKeyword(keyTARGET, *arg) && argP1 != newArgs.end()) {
|
|
|
this->HandlePredicate(
|
|
|
- this->Makefile.FindTargetToUse(argP1->GetValue()) ? true : false,
|
|
|
+ this->Makefile.FindTargetToUse(argP1->GetValue()) != CM_NULLPTR,
|
|
|
reducible, arg, newArgs, argP1, argP2);
|
|
|
}
|
|
|
// does a test exist
|
|
@@ -464,7 +464,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
|
|
this->Policy64Status != cmPolicies::WARN) {
|
|
|
if (this->IsKeyword(keyTEST, *arg) && argP1 != newArgs.end()) {
|
|
|
const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str());
|
|
|
- this->HandlePredicate(haveTest ? true : false, reducible, arg,
|
|
|
+ this->HandlePredicate(haveTest != CM_NULLPTR, reducible, arg,
|
|
|
newArgs, argP1, argP2);
|
|
|
}
|
|
|
} else if (this->Policy64Status == cmPolicies::WARN &&
|
|
@@ -638,8 +638,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs,
|
|
|
bool success = cmSystemTools::FileTimeCompare(
|
|
|
arg->GetValue(), (argP2)->GetValue(), &fileIsNewer);
|
|
|
this->HandleBinaryOp(
|
|
|
- (success == false || fileIsNewer == 1 || fileIsNewer == 0),
|
|
|
- reducible, arg, newArgs, argP1, argP2);
|
|
|
+ (!success || fileIsNewer == 1 || fileIsNewer == 0), reducible, arg,
|
|
|
+ newArgs, argP1, argP2);
|
|
|
}
|
|
|
|
|
|
if (argP1 != newArgs.end() && argP2 != newArgs.end() &&
|