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/cmSystemTools.cxx | |
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/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index a5d191d..276cb57 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -521,6 +521,8 @@ public: } free(this->ArgV); } + cmSystemToolsArgV(const cmSystemToolsArgV&) = delete; + cmSystemToolsArgV& operator=(const cmSystemToolsArgV&) = delete; void Store(std::vector<std::string>& args) const { for (char** arg = this->ArgV; arg && *arg; ++arg) { @@ -533,7 +535,7 @@ void cmSystemTools::ParseUnixCommandLine(const char* command, std::vector<std::string>& args) { // Invoke the underlying parser. - cmSystemToolsArgV argv = cmsysSystem_Parse_CommandForUnix(command, 0); + cmSystemToolsArgV argv(cmsysSystem_Parse_CommandForUnix(command, 0)); argv.Store(args); } |