summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-10-26 10:08:27 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2022-11-17 12:37:13 (GMT)
commit7daadd304f87292cd0ec97525d3738ac96377e8a (patch)
treea141acf9d78528d9890642d1e62e68ddf86ca5a7
parentdf2047c2acacf233ac67d674cda0faf186382db6 (diff)
downloadCMake-7daadd304f87292cd0ec97525d3738ac96377e8a.zip
CMake-7daadd304f87292cd0ec97525d3738ac96377e8a.tar.gz
CMake-7daadd304f87292cd0ec97525d3738ac96377e8a.tar.bz2
cmake.cxx: Simplify `cmake::AppendExtraGeneratorsDocumentation()`
-rw-r--r--Source/cmake.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 0309505..62f926e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2972,21 +2972,14 @@ void cmake::AppendExtraGeneratorsDocumentation(
// Aliases:
for (std::string const& a : eg->Aliases) {
- cmDocumentationEntry e;
- e.Name = a;
- e.Brief = doc;
- v.push_back(std::move(e));
+ v.emplace_back(cmDocumentationEntry{ a, doc });
}
// Full names:
- const std::vector<std::string> generators =
- eg->GetSupportedGlobalGenerators();
- for (std::string const& g : generators) {
- cmDocumentationEntry e;
- e.Name =
- cmExternalMakefileProjectGenerator::CreateFullGeneratorName(g, name);
- e.Brief = doc;
- v.push_back(std::move(e));
+ for (std::string const& g : eg->GetSupportedGlobalGenerators()) {
+ v.emplace_back(cmDocumentationEntry{
+ cmExternalMakefileProjectGenerator::CreateFullGeneratorName(g, name),
+ doc });
}
}
}