浏览代码

if(): avoid one needless string compare for all if() statements

If it's known that it is an "if" it can't be an "elseif".
Rolf Eike Beer 10 年之前
父节点
当前提交
51f8de8102
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmIfCommand.cxx

+ 1 - 1
Source/cmIfCommand.cxx

@@ -45,7 +45,7 @@ IsFunctionBlocked(const cmListFileFunction& lff,
     {
     this->ScopeDepth++;
     }
-  if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif"))
+  else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif"))
     {
     this->ScopeDepth--;
     // if this is the endif for this if statement, then start executing