Jelajahi Sumber

cmCTestRunTest: Use inline member initializers

Brad King 6 tahun lalu
induk
melakukan
0187e52244
2 mengubah file dengan 3 tambahan dan 6 penghapusan
  1. 0 3
      Source/CTest/cmCTestRunTest.cxx
  2. 3 3
      Source/CTest/cmCTestRunTest.h

+ 0 - 3
Source/CTest/cmCTestRunTest.cxx

@@ -34,9 +34,6 @@ cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
   this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
   this->TestResult.TestCount = 0;
   this->TestResult.Properties = nullptr;
-  this->NumberOfRunsLeft = 1; // default to 1 run of the test
-  this->RunUntilFail = false; // default to run the test once
-  this->RunAgain = false;     // default to not having to run again
 }
 
 void cmCTestRunTest::CheckOutput(std::string const& line)

+ 3 - 3
Source/CTest/cmCTestRunTest.h

@@ -129,9 +129,9 @@ private:
   std::vector<std::map<
     std::string, std::vector<cmCTestMultiProcessHandler::HardwareAllocation>>>
     AllocatedHardware;
-  bool RunUntilFail;
-  int NumberOfRunsLeft;
-  bool RunAgain;
+  bool RunUntilFail = false; // default to run the test once
+  int NumberOfRunsLeft = 1;  // default to 1 run of the test
+  bool RunAgain = false;     // default to not having to run again
   size_t TotalNumberOfTests;
 };