diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-02-14 16:29:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-15 12:25:47 (GMT) |
commit | ae5e97a00568d15dedea073b58668e646e3c0d2e (patch) | |
tree | 10ba898956021469c0de5db595ca511c0c83cffd /Source/CTest | |
parent | e3353a0175fb27bc2967c3df78b8be1c0615b21d (diff) | |
download | CMake-ae5e97a00568d15dedea073b58668e646e3c0d2e.zip CMake-ae5e97a00568d15dedea073b58668e646e3c0d2e.tar.gz CMake-ae5e97a00568d15dedea073b58668e646e3c0d2e.tar.bz2 |
Delete some default constructors and assignment operators
They are unused, but if someone used them they would lead to
problems since they would copy the internal raw pointers
and the destructor would cause double delete
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestCurl.h | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestLaunch.h | 3 |
6 files changed, 19 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 696b52f..b2c88df 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -140,6 +140,11 @@ public: cmSystemTools::SetStdoutCallback(nullptr); cmSystemTools::SetMessageCallback(nullptr); } + + cmCTestBuildAndTestCaptureRAII(const cmCTestBuildAndTestCaptureRAII&) = + delete; + cmCTestBuildAndTestCaptureRAII& operator=( + const cmCTestBuildAndTestCaptureRAII&) = delete; }; int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index af664ba..c75f4d4 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -680,6 +680,8 @@ class cmCTestBuildHandler::LaunchHelper public: LaunchHelper(cmCTestBuildHandler* handler); ~LaunchHelper(); + LaunchHelper(const LaunchHelper&) = delete; + LaunchHelper& operator=(const LaunchHelper&) = delete; private: cmCTestBuildHandler* Handler; diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 10928e0..4dda9ad 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -52,6 +52,8 @@ public: } cmsysProcess_Delete(this->Process); } + cmCTestRunProcess(const cmCTestRunProcess&) = delete; + cmCTestRunProcess& operator=(const cmCTestRunProcess&) = delete; void SetCommand(const char* command) { this->CommandLineStrings.clear(); @@ -786,6 +788,9 @@ struct cmCTestCoverageHandlerLocale cmSystemTools::UnsetEnv("LC_ALL"); } } + cmCTestCoverageHandlerLocale(const cmCTestCoverageHandlerLocale&) = delete; + cmCTestCoverageHandlerLocale& operator=( + const cmCTestCoverageHandlerLocale&) = delete; std::string lc_all; }; diff --git a/Source/CTest/cmCTestCurl.h b/Source/CTest/cmCTestCurl.h index 86d9489..6186af8 100644 --- a/Source/CTest/cmCTestCurl.h +++ b/Source/CTest/cmCTestCurl.h @@ -16,6 +16,8 @@ class cmCTestCurl public: cmCTestCurl(cmCTest*); ~cmCTestCurl(); + cmCTestCurl(const cmCTestCurl&) = delete; + cmCTestCurl& operator=(const cmCTestCurl&) = delete; bool UploadFile(std::string const& local_file, std::string const& url, std::string const& fields, std::string& response); bool HttpRequest(std::string const& url, std::string const& fields, diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 57a14ef..adf9553 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -76,6 +76,8 @@ public: } } } + SaveRestoreErrorState(const SaveRestoreErrorState&) = delete; + SaveRestoreErrorState& operator=(const SaveRestoreErrorState&) = delete; private: bool InitialErrorState; diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h index debbe59..107fd61 100644 --- a/Source/CTest/cmCTestLaunch.h +++ b/Source/CTest/cmCTestLaunch.h @@ -28,6 +28,9 @@ private: cmCTestLaunch(int argc, const char* const* argv); ~cmCTestLaunch(); + cmCTestLaunch(const cmCTestLaunch&) = delete; + cmCTestLaunch& operator=(const cmCTestLaunch&) = delete; + // Run the real command. int Run(); void RunChild(); |