cmCTestScriptHandler: Simplify deletes.
Deleting a nullptr is fine.
This commit is contained in:
parent
7fdc9a8b5f
commit
2f2d4da9dd
|
@ -126,20 +126,14 @@ void cmCTestScriptHandler::Initialize()
|
||||||
this->ScriptStartTime = 0;
|
this->ScriptStartTime = 0;
|
||||||
|
|
||||||
this->Makefile = 0;
|
this->Makefile = 0;
|
||||||
if (this->LocalGenerator)
|
|
||||||
{
|
|
||||||
delete this->LocalGenerator;
|
delete this->LocalGenerator;
|
||||||
}
|
|
||||||
this->LocalGenerator = 0;
|
this->LocalGenerator = 0;
|
||||||
if (this->GlobalGenerator)
|
|
||||||
{
|
|
||||||
delete this->GlobalGenerator;
|
delete this->GlobalGenerator;
|
||||||
}
|
|
||||||
this->GlobalGenerator = 0;
|
this->GlobalGenerator = 0;
|
||||||
if (this->CMake)
|
|
||||||
{
|
|
||||||
delete this->CMake;
|
delete this->CMake;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -147,20 +141,9 @@ cmCTestScriptHandler::~cmCTestScriptHandler()
|
||||||
{
|
{
|
||||||
// local generator owns the makefile
|
// local generator owns the makefile
|
||||||
this->Makefile = 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;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue