diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-29 10:36:48 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-30 15:55:39 (GMT) |
commit | 5444a8095da50cdf4306d33fe137baa7711f1781 (patch) | |
tree | c0ec64b08aa5fda9f7b8bb88f263ba5128a205da /Source/cmJsonObjects.cxx | |
parent | 15526d4b1072647179290fb5c2d0a3a5275415c7 (diff) | |
download | CMake-5444a8095da50cdf4306d33fe137baa7711f1781.zip CMake-5444a8095da50cdf4306d33fe137baa7711f1781.tar.gz CMake-5444a8095da50cdf4306d33fe137baa7711f1781.tar.bz2 |
cmGlobalGenerator: modernize memrory managemenbt
Diffstat (limited to 'Source/cmJsonObjects.cxx')
-rw-r--r-- | Source/cmJsonObjects.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx index 5f86d85..54edabc 100644 --- a/Source/cmJsonObjects.cxx +++ b/Source/cmJsonObjects.cxx @@ -8,6 +8,7 @@ #include <functional> #include <limits> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> @@ -44,7 +45,7 @@ namespace { std::vector<std::string> getConfigurations(const cmake* cm) { std::vector<std::string> configurations; - auto makefiles = cm->GetGlobalGenerator()->GetMakefiles(); + const auto& makefiles = cm->GetGlobalGenerator()->GetMakefiles(); if (makefiles.empty()) { return configurations; } @@ -83,8 +84,8 @@ void cmGetCMakeInputs(const cmGlobalGenerator* gg, std::vector<std::string>* tmpFiles) { const std::string cmakeRootDir = cmSystemTools::GetCMakeRoot() + '/'; - std::vector<cmMakefile*> const& makefiles = gg->GetMakefiles(); - for (cmMakefile const* mf : makefiles) { + auto const& makefiles = gg->GetMakefiles(); + for (const auto& mf : makefiles) { for (std::string const& lf : mf->GetListFiles()) { const std::string startOfFile = lf.substr(0, cmakeRootDir.size()); |