浏览代码

Ninja: Avoid using 'this' in member initializers

VS complains

 warning C4355: 'this' : used in base member initializer list

so initialize the member in the constructor body instead.
Brad King 13 年之前
父节点
当前提交
48eb7fc7d7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmNinjaNormalTargetGenerator.cxx

+ 1 - 1
Source/cmNinjaNormalTargetGenerator.cxx

@@ -27,8 +27,8 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
   , TargetNameReal()
   , TargetNameImport()
   , TargetNamePDB()
-  , TargetLinkLanguage(target->GetLinkerLanguage(this->GetConfigName()))
 {
+  this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
   if (target->GetType() == cmTarget::EXECUTABLE)
     target->GetExecutableNames(this->TargetNameOut,
                                this->TargetNameReal,