summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-04-13 20:01:49 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-18 15:05:25 (GMT)
commit9ecb3f8d5c82a86734ee3af3c17a3a08e6b8daa2 (patch)
tree35402853bea619f284764c056a76b79a0649f5e2 /Source/cmMakefileExecutableTargetGenerator.cxx
parentd38d7747fe91db4753e9aa26e9b7dd8d065e1cdc (diff)
downloadCMake-9ecb3f8d5c82a86734ee3af3c17a3a08e6b8daa2.zip
CMake-9ecb3f8d5c82a86734ee3af3c17a3a08e6b8daa2.tar.gz
CMake-9ecb3f8d5c82a86734ee3af3c17a3a08e6b8daa2.tar.bz2
Ninja,Makefile: use `unique_ptr` for memory management
Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator` and 'OSXBundleGenerator` rather than manually handling the lifetime.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 984cd85..ebf5fc2 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -9,6 +9,7 @@
#include <utility>
#include <vector>
+#include "cmAlgorithms.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
@@ -35,14 +36,12 @@ cmMakefileExecutableTargetGenerator::cmMakefileExecutableTargetGenerator(
this->GeneratorTarget->GetExecutableNames(this->ConfigName);
this->OSXBundleGenerator =
- new cmOSXBundleGenerator(target, this->ConfigName);
+ cm::make_unique<cmOSXBundleGenerator>(target, this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
-cmMakefileExecutableTargetGenerator::~cmMakefileExecutableTargetGenerator()
-{
- delete this->OSXBundleGenerator;
-}
+cmMakefileExecutableTargetGenerator::~cmMakefileExecutableTargetGenerator() =
+ default;
void cmMakefileExecutableTargetGenerator::WriteRuleFiles()
{