mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
Refactor: Remove redundant checks for 0 and 1 literals
They are gonna be checked by `cmIsOn()` anyway.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user