瀏覽代碼

Refactor: Set `const` to `cmConditionEvaluator::IsKeyword` parameters

Alex Turbov 4 年之前
父節點
當前提交
17af3baddd
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 3 2
      Source/cmConditionEvaluator.cxx
  2. 1 1
      Source/cmConditionEvaluator.h

+ 3 - 2
Source/cmConditionEvaluator.cxx

@@ -222,8 +222,9 @@ cmProp cmConditionEvaluator::GetVariableOrString(
 }
 
 //=========================================================================
-bool cmConditionEvaluator::IsKeyword(cm::static_string_view keyword,
-                                     cmExpandedCommandArgument& argument) const
+bool cmConditionEvaluator::IsKeyword(
+  cm::static_string_view keyword,
+  const cmExpandedCommandArgument& argument) const
 {
   if ((this->Policy54Status != cmPolicies::WARN &&
        this->Policy54Status != cmPolicies::OLD) &&

+ 1 - 1
Source/cmConditionEvaluator.h

@@ -39,7 +39,7 @@ private:
   cmProp GetVariableOrString(const cmExpandedCommandArgument& argument) const;
 
   bool IsKeyword(cm::static_string_view keyword,
-                 cmExpandedCommandArgument& argument) const;
+                 const cmExpandedCommandArgument& argument) const;
 
   bool GetBooleanValue(cmExpandedCommandArgument& arg) const;