diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2018-11-30 18:00:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-18 17:57:32 (GMT) |
commit | 7408cd39298dfce442d7aa539a90a227433865d5 (patch) | |
tree | 1910148c8048133dc1ff4c557d070c17940cbe9b /Source/CursesDialog | |
parent | a61c061b6143cb6d8920b1b5796a867c0f104556 (diff) | |
download | CMake-7408cd39298dfce442d7aa539a90a227433865d5.zip CMake-7408cd39298dfce442d7aa539a90a227433865d5.tar.gz CMake-7408cd39298dfce442d7aa539a90a227433865d5.tar.bz2 |
cmake: Return generator docs directly
The GetGeneratorDocumentation() function was not accurately
named and required the vector to populate to be passed as a
function argument. This commit makes the slightly renamed
function return by value, making it a true getter as implied
by its name. Some minor refactoring of the implementation
also makes the steps of populating the vector clearer.
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 6dc692e..44789b0 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -5,7 +5,7 @@ #include "cmCursesMainForm.h" #include "cmCursesStandardIncludes.h" #include "cmDocumentation.h" -#include "cmDocumentationEntry.h" +#include "cmDocumentationEntry.h" // IWYU pragma: keep #include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" @@ -88,8 +88,7 @@ int main(int argc, char const* const* argv) hcm.SetHomeDirectory(""); hcm.SetHomeOutputDirectory(""); hcm.AddCMakePaths(); - std::vector<cmDocumentationEntry> generators; - hcm.GetGeneratorDocumentation(generators); + auto generators = hcm.GetGeneratorsDocumentation(); doc.SetName("ccmake"); doc.SetSection("Name", cmDocumentationName); doc.SetSection("Usage", cmDocumentationUsage); |