diff options
author | Brad King <brad.king@kitware.com> | 2019-01-21 12:51:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-21 12:51:54 (GMT) |
commit | 4dba5d6ce251257259874bce394b2fba954e200c (patch) | |
tree | f775a504eb80d0383231fb99eb301a962a989fb2 /Source/cmJsonObjects.cxx | |
parent | 7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (diff) | |
parent | ef61997b1be5c2f542472f8eb48dac62cd26bf5c (diff) | |
download | CMake-4dba5d6ce251257259874bce394b2fba954e200c.zip CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.gz CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.bz2 |
Merge topic 'use-emplace'
ef61997b1b clang-tidy: Use emplace
2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2811
Diffstat (limited to 'Source/cmJsonObjects.cxx')
-rw-r--r-- | Source/cmJsonObjects.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx index bb56714..135fd25 100644 --- a/Source/cmJsonObjects.cxx +++ b/Source/cmJsonObjects.cxx @@ -49,7 +49,7 @@ std::vector<std::string> getConfigurations(const cmake* cm) makefiles[0]->GetConfigurations(configurations); if (configurations.empty()) { - configurations.push_back(""); + configurations.emplace_back(); } return configurations; } @@ -292,10 +292,10 @@ static Json::Value DumpSourceFilesList( lg->AppendIncludeDirectories(includes, evaluatedIncludes, *file); for (const auto& include : includes) { - fileData.IncludePathList.push_back( - std::make_pair(include, - target->IsSystemIncludeDirectory( - include, config, fileData.Language))); + fileData.IncludePathList.emplace_back( + include, + target->IsSystemIncludeDirectory(include, config, + fileData.Language)); } } @@ -580,8 +580,8 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::vector<std::string> includePathList; lg->GetIncludeDirectories(includePathList, target, lang, config, true); for (std::string const& i : includePathList) { - ld.IncludePathList.push_back( - std::make_pair(i, target->IsSystemIncludeDirectory(i, config, lang))); + ld.IncludePathList.emplace_back( + i, target->IsSystemIncludeDirectory(i, config, lang)); } } |