Modernize memory management

Update internals of various classes
This commit is contained in:
Marc Chevrier
2020-02-26 15:52:47 +01:00
parent ab2d170c74
commit 557cecdc3d
17 changed files with 126 additions and 138 deletions
+5 -6
View File
@@ -7,6 +7,8 @@
#include <sstream>
#include <utility>
#include <cm/memory>
#ifndef CMAKE_BOOTSTRAP
# include "cmExportInstallAndroidMKGenerator.h"
#endif
@@ -33,18 +35,15 @@ cmInstallExportGenerator::cmInstallExportGenerator(
{
if (android) {
#ifndef CMAKE_BOOTSTRAP
this->EFGen = new cmExportInstallAndroidMKGenerator(this);
this->EFGen = cm::make_unique<cmExportInstallAndroidMKGenerator>(this);
#endif
} else {
this->EFGen = new cmExportInstallFileGenerator(this);
this->EFGen = cm::make_unique<cmExportInstallFileGenerator>(this);
}
exportSet->AddInstallation(this);
}
cmInstallExportGenerator::~cmInstallExportGenerator()
{
delete this->EFGen;
}
cmInstallExportGenerator::~cmInstallExportGenerator() = default;
bool cmInstallExportGenerator::Compute(cmLocalGenerator* lg)
{