summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-03-02 09:41:17 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-03-08 15:32:44 (GMT)
commit44867a8c013a2ae6b828ef12af8e81cb73795483 (patch)
treec81f902ed5de798ea88a6c4e5bd1f7d57c1936ee /Source/CTest/cmCTestScriptHandler.h
parent1bb7474abac4eb3aa7dd1b52d9d09d2205e104f3 (diff)
downloadCMake-44867a8c013a2ae6b828ef12af8e81cb73795483.zip
CMake-44867a8c013a2ae6b828ef12af8e81cb73795483.tar.gz
CMake-44867a8c013a2ae6b828ef12af8e81cb73795483.tar.bz2
Modernize memory management
Update internals of various classes.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.h')
-rw-r--r--Source/CTest/cmCTestScriptHandler.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h
index d003199..ebb7905 100644
--- a/Source/CTest/cmCTestScriptHandler.h
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -101,12 +101,14 @@ public:
cmDuration GetRemainingTimeAllowed();
cmCTestScriptHandler();
+ cmCTestScriptHandler(const cmCTestScriptHandler&) = delete;
+ const cmCTestScriptHandler& operator=(const cmCTestScriptHandler&) = delete;
~cmCTestScriptHandler() override;
void Initialize() override;
void CreateCMake();
- cmake* GetCMake() { return this->CMake; }
+ cmake* GetCMake() { return this->CMake.get(); }
void SetRunCurrentScript(bool value);
@@ -143,9 +145,9 @@ private:
bool ShouldRunCurrentScript;
- bool Backup;
- bool EmptyBinDir;
- bool EmptyBinDirOnce;
+ bool Backup = false;
+ bool EmptyBinDir = false;
+ bool EmptyBinDirOnce = false;
std::string SourceDir;
std::string BinaryDir;
@@ -161,16 +163,18 @@ private:
std::string CMOutFile;
std::vector<std::string> ExtraUpdates;
- double MinimumInterval;
- double ContinuousDuration;
+ // the *60 is because the settings are in minutes but GetTime is seconds
+ double MinimumInterval = 30 * 60;
+ double ContinuousDuration = -1;
// what time in seconds did this script start running
- std::chrono::steady_clock::time_point ScriptStartTime;
+ std::chrono::steady_clock::time_point ScriptStartTime =
+ std::chrono::steady_clock::time_point();
- cmMakefile* Makefile;
- cmMakefile* ParentMakefile;
- cmGlobalGenerator* GlobalGenerator;
- cmake* CMake;
+ std::unique_ptr<cmMakefile> Makefile;
+ cmMakefile* ParentMakefile = nullptr;
+ std::unique_ptr<cmGlobalGenerator> GlobalGenerator;
+ std::unique_ptr<cmake> CMake;
};
#endif