summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.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/cmMakefileLibraryTargetGenerator.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/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 44e6547..0393e22 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -9,6 +9,7 @@
#include <utility>
#include <vector>
+#include "cmAlgorithms.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
@@ -37,14 +38,12 @@ cmMakefileLibraryTargetGenerator::cmMakefileLibraryTargetGenerator(
}
this->OSXBundleGenerator =
- new cmOSXBundleGenerator(target, this->ConfigName);
+ cm::make_unique<cmOSXBundleGenerator>(target, this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
}
-cmMakefileLibraryTargetGenerator::~cmMakefileLibraryTargetGenerator()
-{
- delete this->OSXBundleGenerator;
-}
+cmMakefileLibraryTargetGenerator::~cmMakefileLibraryTargetGenerator() =
+ default;
void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
{