浏览代码

Merge topic 'preallocate-condition-keywords'

aff4a5fa cmConditionEvaluator: Use pre-allocated keywords in more places
Brad King 9 年之前
父节点
当前提交
3a556f005d
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Source/cmConditionEvaluator.cxx

+ 4 - 4
Source/cmConditionEvaluator.cxx

@@ -663,11 +663,11 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs,
           {
           result = false;
           }
-        else if (*(argP1) == "LESS")
+        else if (*(argP1) == keyLESS)
           {
           result = (lhs < rhs);
           }
-        else if (*(argP1) == "GREATER")
+        else if (*(argP1) == keyGREATER)
           {
           result = (lhs > rhs);
           }
@@ -688,11 +688,11 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs,
         def2 = this->GetVariableOrString(*argP2);
         int val = strcmp(def,def2);
         bool result;
-        if (*(argP1) == "STRLESS")
+        if (*(argP1) == keySTRLESS)
           {
           result = (val < 0);
           }
-        else if (*(argP1) == "STRGREATER")
+        else if (*(argP1) == keySTRGREATER)
           {
           result = (val > 0);
           }