mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 23:28:32 -05:00
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.
This commit is contained in:
committed by
Brad King
parent
d38d7747fe
commit
9ecb3f8d5c
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user