summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-11 15:30:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-11 15:30:30 (GMT)
commita97aeb0f238b7d03217f8e1b59edfd8cd25e59cf (patch)
treef3ff4f490eb5b15e6c124c092e81b2795458a72a /Source/cmake.cxx
parent115cda729a092c62f1aa5769ae43cf26da27a6ed (diff)
parent36c8cae2e8c23228d3292e77b9bfc65b009bb263 (diff)
downloadCMake-a97aeb0f238b7d03217f8e1b59edfd8cd25e59cf.zip
CMake-a97aeb0f238b7d03217f8e1b59edfd8cd25e59cf.tar.gz
CMake-a97aeb0f238b7d03217f8e1b59edfd8cd25e59cf.tar.bz2
Merge topic 'modernize-memory-management'
36c8cae2e8 cmLocalGenerator: modernize memory management Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4124
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b1c6e8f..c9fe963 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -538,7 +538,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::vector<std::string> includeDirs = cmExpandedList(includes);
gg->CreateGenerationObjects();
- cmLocalGenerator* lg = gg->LocalGenerators[0];
+ const auto& lg = gg->LocalGenerators[0];
std::string includeFlags =
lg->GetIncludeFlags(includeDirs, nullptr, language);
@@ -2169,7 +2169,7 @@ int cmake::CheckBuildSystem()
if (ggd) {
cm.GetCurrentSnapshot().SetDefaultDefinitions();
cmMakefile mfd(ggd.get(), cm.GetCurrentSnapshot());
- std::unique_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator(&mfd));
+ auto lgd = ggd->CreateLocalGenerator(&mfd);
lgd->ClearDependencies(&mfd, verbose);
}
}