Kaynağa Gözat

cmVSSetupHelper: Use in-class member initialization

Brad King 7 yıl önce
ebeveyn
işleme
d548994afc
1 değiştirilmiş dosya ile 4 ekleme ve 9 silme
  1. 4 9
      Source/cmVSSetupHelper.h

+ 4 - 9
Source/cmVSSetupHelper.h

@@ -107,16 +107,11 @@ struct VSInstanceInfo
   std::wstring InstanceId;
   std::wstring InstanceId;
   std::wstring VSInstallLocation;
   std::wstring VSInstallLocation;
   std::wstring Version;
   std::wstring Version;
-  ULONGLONG ullVersion;
-  bool IsWin10SDKInstalled;
-  bool IsWin81SDKInstalled;
+  ULONGLONG ullVersion = 0;
+  bool IsWin10SDKInstalled = false;
+  bool IsWin81SDKInstalled = false;
 
 
-  VSInstanceInfo()
-  {
-    InstanceId = VSInstallLocation = Version = L"";
-    ullVersion = 0;
-    IsWin10SDKInstalled = IsWin81SDKInstalled = false;
-  }
+  VSInstanceInfo() = default;
 
 
   std::string GetInstallLocation() const;
   std::string GetInstallLocation() const;
 };
 };