summaryrefslogtreecommitdiffstats
path: root/Source/cmFileAPICodemodel.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-01-12 15:58:54 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-01-14 10:03:07 (GMT)
commitf466cea3c9edffb1f524b64c514f8b7ef3913988 (patch)
treed6623a9efbd040dd7e6a091117fd642bc003b81c /Source/cmFileAPICodemodel.cxx
parent2d5e9f3d8cf44fafcd9a3b75ebce3d6fe383fe4e (diff)
downloadCMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.zip
CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.gz
CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.bz2
cmMakefile: modernize memory management
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r--Source/cmFileAPICodemodel.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index d13e8ec..955195f 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -493,8 +493,9 @@ void CodemodelConfig::ProcessDirectories()
Directory& d = *di;
// Accumulate the presence of install rules on the way up.
- for (auto gen : d.LocalGenerator->GetMakefile()->GetInstallGenerators()) {
- if (!dynamic_cast<cmInstallSubdirectoryGenerator*>(gen)) {
+ for (const auto& gen :
+ d.LocalGenerator->GetMakefile()->GetInstallGenerators()) {
+ if (!dynamic_cast<cmInstallSubdirectoryGenerator*>(gen.get())) {
d.HasInstallRule = true;
break;
}