diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-06-21 00:41:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-24 13:36:09 (GMT) |
commit | 5e52de7d5708c5d2faf00837bf5f10ed024cced1 (patch) | |
tree | 78012dbe66b15c98b4bee75730d7693583a99d4f /Source/cmGlobalGenerator.cxx | |
parent | cecf7e61c4816e4a3bb55df243c6bf84f6df6e58 (diff) | |
download | CMake-5e52de7d5708c5d2faf00837bf5f10ed024cced1.zip CMake-5e52de7d5708c5d2faf00837bf5f10ed024cced1.tar.gz CMake-5e52de7d5708c5d2faf00837bf5f10ed024cced1.tar.bz2 |
modermize: replace some raw pointers w/ `unique_ptr`
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index df0f33f..b250dd7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -92,7 +92,6 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) // how long to let try compiles run this->TryCompileTimeout = cmDuration::zero(); - this->ExtraGenerator = nullptr; this->CurrentConfigureMakefile = nullptr; this->TryCompileOuterMakefile = nullptr; @@ -113,7 +112,6 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) cmGlobalGenerator::~cmGlobalGenerator() { this->ClearGeneratorMembers(); - delete this->ExtraGenerator; } #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -1499,7 +1497,7 @@ void cmGlobalGenerator::Generate() this->WriteSummary(); - if (this->ExtraGenerator != nullptr) { + if (this->ExtraGenerator) { this->ExtraGenerator->Generate(); } @@ -2720,8 +2718,8 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name) void cmGlobalGenerator::SetExternalMakefileProjectGenerator( cmExternalMakefileProjectGenerator* extraGenerator) { - this->ExtraGenerator = extraGenerator; - if (this->ExtraGenerator != nullptr) { + this->ExtraGenerator.reset(extraGenerator); + if (this->ExtraGenerator) { this->ExtraGenerator->SetGlobalGenerator(this); } } |