summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-06-21 00:41:48 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-24 13:36:09 (GMT)
commit5e52de7d5708c5d2faf00837bf5f10ed024cced1 (patch)
tree78012dbe66b15c98b4bee75730d7693583a99d4f /Source/cmGlobalGenerator.cxx
parentcecf7e61c4816e4a3bb55df243c6bf84f6df6e58 (diff)
downloadCMake-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.cxx8
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);
}
}