diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-12 15:58:54 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-14 10:03:07 (GMT) |
commit | f466cea3c9edffb1f524b64c514f8b7ef3913988 (patch) | |
tree | d6623a9efbd040dd7e6a091117fd642bc003b81c /Source/cmQtAutoGenInitializer.cxx | |
parent | 2d5e9f3d8cf44fafcd9a3b75ebce3d6fe383fe4e (diff) | |
download | CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.zip CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.gz CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.bz2 |
cmMakefile: modernize memory management
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 46f1716..2edff25 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -883,7 +883,7 @@ bool cmQtAutoGenInitializer::InitScanFiles() // The reason is that their file names might be discovered from source files // at generation time. if (this->MocOrUicEnabled()) { - for (cmSourceFile* sf : this->Makefile->GetSourceFiles()) { + for (const auto& sf : this->Makefile->GetSourceFiles()) { // sf->GetExtension() is only valid after sf->ResolveFullPath() ... // Since we're iterating over source files that might be not in the // target we need to check for path errors (not existing files). @@ -896,15 +896,15 @@ bool cmQtAutoGenInitializer::InitScanFiles() cmSystemTools::LowerCase(sf->GetExtension()); if (cm->IsHeaderExtension(extLower)) { - if (!cmContains(this->AutogenTarget.Headers, sf)) { - auto muf = makeMUFile(sf, fullPath, false); + if (!cmContains(this->AutogenTarget.Headers, sf.get())) { + auto muf = makeMUFile(sf.get(), fullPath, false); if (muf->SkipMoc || muf->SkipUic) { addMUHeader(std::move(muf), extLower); } } } else if (cm->IsSourceExtension(extLower)) { - if (!cmContains(this->AutogenTarget.Sources, sf)) { - auto muf = makeMUFile(sf, fullPath, false); + if (!cmContains(this->AutogenTarget.Sources, sf.get())) { + auto muf = makeMUFile(sf.get(), fullPath, false); if (muf->SkipMoc || muf->SkipUic) { addMUSource(std::move(muf)); } |