From f37d6a31703bd74dddfbc82b41f3d97633edb70b Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Mon, 2 Aug 2021 19:22:07 +0300 Subject: Refactor: Remove redundant checks for `0` and `1` literals They are gonna be checked by `cmIsOn()` anyway. --- Source/cmConditionEvaluator.cxx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index ea5dce5..9485d04 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -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; } -- cgit v0.12