summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallExportGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-02-26 14:52:47 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-02-27 10:11:30 (GMT)
commit557cecdc3d9ace51229b3dfce4a2ed71c2cc5c5c (patch)
tree656e2b8567e3c12c115bd1922f6bddb43c18a811 /Source/cmInstallExportGenerator.cxx
parentab2d170c746d7cb68c39e9577cdaabc66668c0aa (diff)
downloadCMake-557cecdc3d9ace51229b3dfce4a2ed71c2cc5c5c.zip
CMake-557cecdc3d9ace51229b3dfce4a2ed71c2cc5c5c.tar.gz
CMake-557cecdc3d9ace51229b3dfce4a2ed71c2cc5c5c.tar.bz2
Modernize memory management
Update internals of various classes
Diffstat (limited to 'Source/cmInstallExportGenerator.cxx')
-rw-r--r--Source/cmInstallExportGenerator.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 2c53a28..6e3508c 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -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)
{