浏览代码

cmMakefile: Simplify GetCMakeInstance implementation.

No callers handle the possibility that it can return null, and that
is no longer possible anyway.
Stephen Kelly 10 年之前
父节点
当前提交
efcca9353f
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      Source/cmMakefile.cxx

+ 1 - 5
Source/cmMakefile.cxx

@@ -3693,11 +3693,7 @@ bool cmMakefile::GetIsSourceFileTryCompile() const
 
 cmake *cmMakefile::GetCMakeInstance() const
 {
-  if ( this->LocalGenerator && this->LocalGenerator->GetGlobalGenerator() )
-    {
-    return this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance();
-    }
-  return 0;
+  return this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance();
 }
 
 #ifdef CMAKE_BUILD_WITH_CMAKE