浏览代码

backwards MATCHES in if and else statements

Ken Martin 24 年之前
父节点
当前提交
c151f30861
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Source/cmElseCommand.cxx
  2. 1 1
      Source/cmIfCommand.cxx

+ 1 - 1
Source/cmElseCommand.cxx

@@ -100,7 +100,7 @@ bool cmElseCommand::InitialPass(std::vector<std::string>& args)
     cmRegularExpression regEntry(args[2].c_str());
     
     // check for black line or comment
-    if (!regEntry.find(def))
+    if (regEntry.find(def))
       {
       f = new cmIfFunctionBlocker();
       }

+ 1 - 1
Source/cmIfCommand.cxx

@@ -128,7 +128,7 @@ bool cmIfCommand::InitialPass(std::vector<std::string>& args)
     cmRegularExpression regEntry(args[2].c_str());
     
     // check for black line or comment
-    if (regEntry.find(def))
+    if (!regEntry.find(def))
       {
       f = new cmIfFunctionBlocker();
       }