Skip to content
Snippets Groups Projects
Commit 2f2d4da9 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmCTestScriptHandler: Simplify deletes.

Deleting a nullptr is fine.
parent 7fdc9a8b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment