Refactor: Remove redundant checks for 0 and 1 literals

They are gonna be checked by `cmIsOn()` anyway.
This commit is contained in:
Alex Turbov
2021-08-02 19:22:07 +03:00
committed by Brad King
parent 00961a4782
commit f37d6a3170

View File

@@ -355,15 +355,7 @@ bool cmConditionEvaluator::IsKeyword(
bool cmConditionEvaluator::GetBooleanValue(
cmExpandedCommandArgument& arg) const
{
// Check basic constants.
if (arg == "0") {
return false;
}
if (arg == "1") {
return true;
}
// Check named constants.
// Check basic and named constants.
if (cmIsOn(arg.GetValue())) {
return true;
}