mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03: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