diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-23 17:39:53 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2022-11-17 12:37:11 (GMT) |
commit | 74b735dea8e2255c53f12afea5706ad443d64785 (patch) | |
tree | 03933961bcaf525b00f2a27a3bc018fed503c40b /Source/QtDialog | |
parent | 807aa8e35382ab55120ccb1e6ae88523ad7ee5a3 (diff) | |
download | CMake-74b735dea8e2255c53f12afea5706ad443d64785.zip CMake-74b735dea8e2255c53f12afea5706ad443d64785.tar.gz CMake-74b735dea8e2255c53f12afea5706ad443d64785.tar.bz2 |
cmDocumentation: `char*[][2]` → `cmDocumentationEntry[N]`
Use fixed size arrays of `cmDocumentationEntry` items instead of
open arrays of two `char` pointers when describe program options
help screens.
Also, drop `const char*[][2]` overloads of methods of
`cmDocumentation` and `cmDocumentationSection` classes in the sake
of generic (template) appenders introduced earlier.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 3113d64..11f7fe6 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -23,25 +23,23 @@ #include "cmake.h" namespace { -const char* cmDocumentationName[][2] = { { nullptr, - " cmake-gui - CMake GUI." }, - { nullptr, nullptr } }; - -const char* cmDocumentationUsage[][2] = { - { nullptr, - " cmake-gui [options]\n" - " cmake-gui [options] <path-to-source>\n" - " cmake-gui [options] <path-to-existing-build>\n" - " cmake-gui [options] -S <path-to-source> -B <path-to-build>\n" - " cmake-gui [options] --browse-manual\n" }, - { nullptr, nullptr } +const cmDocumentationEntry cmDocumentationName = { + nullptr, " cmake-gui - CMake GUI." }; -const char* cmDocumentationOptions[][2] = { +const cmDocumentationEntry cmDocumentationUsage = { + nullptr, + " cmake-gui [options]\n" + " cmake-gui [options] <path-to-source>\n" + " cmake-gui [options] <path-to-existing-build>\n" + " cmake-gui [options] -S <path-to-source> -B <path-to-build>\n" + " cmake-gui [options] --browse-manual" +}; + +const cmDocumentationEntry cmDocumentationOptions[3] = { { "-S <path-to-source>", "Explicitly specify a source directory." }, { "-B <path-to-build>", "Explicitly specify a build directory." }, - { "--preset=<preset>", "Specify a configure preset." }, - { nullptr, nullptr } + { "--preset=<preset>", "Specify a configure preset." } }; } // anonymous namespace |