summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.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/cmNinjaNormalTargetGenerator.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/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3300fef..af47fa7 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -54,14 +54,11 @@ cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator(
}
this->OSXBundleGenerator =
- new cmOSXBundleGenerator(target, this->GetConfigName());
+ cm::make_unique<cmOSXBundleGenerator>(target, this->GetConfigName());
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
-cmNinjaNormalTargetGenerator::~cmNinjaNormalTargetGenerator()
-{
- delete this->OSXBundleGenerator;
-}
+cmNinjaNormalTargetGenerator::~cmNinjaNormalTargetGenerator() = default;
void cmNinjaNormalTargetGenerator::Generate()
{