summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-24 21:00:21 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-28 16:44:38 (GMT)
commit2f2d4da9dd031cdf9f8a0cadcbdffe38c2170353 (patch)
treeecd15e6590cfd86efe25c57e50b156130df36135 /Source/CTest/cmCTestScriptHandler.cxx
parent7fdc9a8b5f63f645b5aedede4fd18e0c1d1c39c5 (diff)
downloadCMake-2f2d4da9dd031cdf9f8a0cadcbdffe38c2170353.zip
CMake-2f2d4da9dd031cdf9f8a0cadcbdffe38c2170353.tar.gz
CMake-2f2d4da9dd031cdf9f8a0cadcbdffe38c2170353.tar.bz2
cmCTestScriptHandler: Simplify deletes.
Deleting a nullptr is fine.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx35
1 files changed, 9 insertions, 26 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 8327f29..4be5eb6 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -126,20 +126,14 @@ void cmCTestScriptHandler::Initialize()
this->ScriptStartTime = 0;
this->Makefile = 0;
- if (this->LocalGenerator)
- {
- delete this->LocalGenerator;
- }
+
+ delete this->LocalGenerator;
this->LocalGenerator = 0;
- if (this->GlobalGenerator)
- {
- delete this->GlobalGenerator;
- }
+
+ delete this->GlobalGenerator;
this->GlobalGenerator = 0;
- if (this->CMake)
- {
- delete this->CMake;
- }
+
+ delete this->CMake;
}
//----------------------------------------------------------------------
@@ -147,20 +141,9 @@ cmCTestScriptHandler::~cmCTestScriptHandler()
{
// local generator owns the makefile
this->Makefile = 0;
- if (this->LocalGenerator)
- {
- delete this->LocalGenerator;
- }
- this->LocalGenerator = 0;
- if (this->GlobalGenerator)
- {
- delete this->GlobalGenerator;
- }
- this->GlobalGenerator = 0;
- if (this->CMake)
- {
- delete this->CMake;
- }
+ delete this->LocalGenerator;
+ delete this->GlobalGenerator;
+ delete this->CMake;
}