Browse Source

cmCTestCurl: Use inline member initialization

Brad King 1 year ago
parent
commit
7f668bb94f
2 changed files with 7 additions and 13 deletions
  1. 1 7
      Source/CTest/cmCTestCurl.cxx
  2. 6 6
      Source/CTest/cmCTestCurl.h

+ 1 - 7
Source/CTest/cmCTestCurl.cxx

@@ -13,17 +13,11 @@
 #include "cmSystemTools.h"
 
 cmCTestCurl::cmCTestCurl(cmCTest* ctest)
+  : CTest(ctest)
 {
-  this->CTest = ctest;
   this->SetProxyType();
-  this->UseHttp10 = false;
   // In windows, this will init the winsock stuff
   ::curl_global_init(CURL_GLOBAL_ALL);
-  // default is to verify https
-  this->VerifyPeerOff = false;
-  this->VerifyHostOff = false;
-  this->Quiet = false;
-  this->TimeOutSeconds = 0;
   this->Curl = curl_easy_init();
 }
 

+ 6 - 6
Source/CTest/cmCTestCurl.h

@@ -40,14 +40,14 @@ protected:
 
 private:
   cmCTest* CTest;
-  CURL* Curl;
+  CURL* Curl = nullptr;
   std::vector<std::string> HttpHeaders;
   std::string HTTPProxyAuth;
   std::string HTTPProxy;
   curl_proxytype HTTPProxyType;
-  bool VerifyHostOff;
-  bool VerifyPeerOff;
-  bool UseHttp10;
-  bool Quiet;
-  int TimeOutSeconds;
+  bool VerifyHostOff = false;
+  bool VerifyPeerOff = false;
+  bool UseHttp10 = false;
+  bool Quiet = false;
+  int TimeOutSeconds = 0;
 };