diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-09 17:13:42 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-09 23:24:06 (GMT) |
commit | 36c8cae2e8c23228d3292e77b9bfc65b009bb263 (patch) | |
tree | d2dae86bea8247398e6edef358a72cd661e588a7 /Source/cmGlobalGhsMultiGenerator.cxx | |
parent | 352999ac4647d6c5b0d81890df4531d677532843 (diff) | |
download | CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.zip CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.gz CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.bz2 |
cmLocalGenerator: modernize memory management
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 7afcd49..bb9dd37 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -8,6 +8,8 @@ #include <ostream> #include <utility> +#include <cm/memory> + #include "cmAlgorithms.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" @@ -40,10 +42,11 @@ cmGlobalGhsMultiGenerator::cmGlobalGhsMultiGenerator(cmake* cm) cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator() = default; -cmLocalGenerator* cmGlobalGhsMultiGenerator::CreateLocalGenerator( - cmMakefile* mf) +std::unique_ptr<cmLocalGenerator> +cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmMakefile* mf) { - return new cmLocalGhsMultiGenerator(this, mf); + return std::unique_ptr<cmLocalGenerator>( + cm::make_unique<cmLocalGhsMultiGenerator>(this, mf)); } void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry& entry) |