summaryrefslogtreecommitdiffstats
path: root/Source/cmJsonObjects.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-12-29 10:36:48 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-12-30 15:55:39 (GMT)
commit5444a8095da50cdf4306d33fe137baa7711f1781 (patch)
treec0ec64b08aa5fda9f7b8bb88f263ba5128a205da /Source/cmJsonObjects.cxx
parent15526d4b1072647179290fb5c2d0a3a5275415c7 (diff)
downloadCMake-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.cxx7
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());