diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-02-26 14:52:47 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-02-27 10:11:30 (GMT) |
commit | 557cecdc3d9ace51229b3dfce4a2ed71c2cc5c5c (patch) | |
tree | 656e2b8567e3c12c115bd1922f6bddb43c18a811 /Source/cmInstallExportGenerator.cxx | |
parent | ab2d170c746d7cb68c39e9577cdaabc66668c0aa (diff) | |
download | CMake-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.cxx | 11 |
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) { |