cmCTestScriptHandler: Simplify deletes.
Deleting a nullptr is fine.
This commit is contained in:
parent
7fdc9a8b5f
commit
2f2d4da9dd
|
@ -126,42 +126,25 @@ void cmCTestScriptHandler::Initialize()
|
|||
this->ScriptStartTime = 0;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue