浏览代码

cmMakefile: Remove duplicate variable initialization.

Stephen Kelly 10 年之前
父节点
当前提交
1363bff83a
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      Source/cmMakefile.cxx

+ 2 - 4
Source/cmMakefile.cxx

@@ -152,8 +152,8 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
   this->Internal->IsSourceFileTryCompile = false;
 
   // Initialize these first since AddDefaultDefinitions calls AddDefinition
-  this->WarnUnused = false;
-  this->CheckSystemVars = false;
+  this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
+  this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
 
   this->GeneratingBuildSystem = false;
   this->SuppressWatches = false;
@@ -223,8 +223,6 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
 #endif
 
   this->Properties.SetCMakeInstance(this->GetCMakeInstance());
-  this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
-  this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
 
   {
   const char* dir = this->GetCMakeInstance()->GetHomeDirectory();