diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index efb549f041..f81c6e8775 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -36,11 +36,11 @@ namespace { const cmDocumentationEntry cmDocumentationName = { - nullptr, " cpack - Packaging driver provided by CMake." + {}, + " cpack - Packaging driver provided by CMake." }; -const cmDocumentationEntry cmDocumentationUsage = { nullptr, - " cpack [options]" }; +const cmDocumentationEntry cmDocumentationUsage = { {}, " cpack [options]" }; const cmDocumentationEntry cmDocumentationOptions[14] = { { "-G ", "Override/define CPACK_GENERATOR" }, diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index d61954a8c8..18c1a807f1 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -25,21 +25,23 @@ namespace { const cmDocumentationEntry cmDocumentationName = { - nullptr, " ccmake - Curses Interface for CMake." + {}, + " ccmake - Curses Interface for CMake." }; const cmDocumentationEntry cmDocumentationUsage[2] = { - { nullptr, + { {}, " ccmake \n" " ccmake " }, - { nullptr, + { {}, "Specify a source directory to (re-)generate a build system for " "it in the current working directory. Specify an existing build " "directory to re-generate its build system." }, }; const cmDocumentationEntry cmDocumentationUsageNote = { - nullptr, "Run 'ccmake --help' for more information." + {}, + "Run 'ccmake --help' for more information." }; #ifndef _WIN32 diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 11f7fe6043..50e8e3aa5a 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -24,11 +24,12 @@ namespace { const cmDocumentationEntry cmDocumentationName = { - nullptr, " cmake-gui - CMake GUI." + {}, + " cmake-gui - CMake GUI." }; const cmDocumentationEntry cmDocumentationUsage = { - nullptr, + {}, " cmake-gui [options]\n" " cmake-gui [options] \n" " cmake-gui [options] \n" diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index e626f7e04e..77c5295ff4 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -47,11 +47,12 @@ const cmDocumentationEntry cmDocumentationStandardOptions[20] = { }; const cmDocumentationEntry cmDocumentationCPackGeneratorsHeader = { - nullptr, "The following generators are available on this platform:" + {}, + "The following generators are available on this platform:" }; const cmDocumentationEntry cmDocumentationCMakeGeneratorsHeader = { - nullptr, + {}, "The following generators are available on this platform (* marks " "default):" }; diff --git a/Source/cmDocumentationEntry.h b/Source/cmDocumentationEntry.h index aa973918f4..c66b21e6d2 100644 --- a/Source/cmDocumentationEntry.h +++ b/Source/cmDocumentationEntry.h @@ -9,17 +9,16 @@ /** Standard documentation entry for cmDocumentation's formatting. */ struct cmDocumentationEntry { - std::string Name; - std::string Brief; - char CustomNamePrefix = ' '; +#if __cplusplus <= 201103L cmDocumentationEntry() = default; - cmDocumentationEntry(const char* const n, const char* const b) + cmDocumentationEntry(const std::string& name, const std::string& brief) + : Name{ name } + , Brief{ brief } { - if (n) { - this->Name = n; - } - if (b) { - this->Brief = b; - } } +#endif + + std::string Name = {}; + std::string Brief = {}; + char CustomNamePrefix = ' '; }; diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index b80131dd5e..b5e24fec93 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -52,12 +52,6 @@ public: std::end(entries)); } - /** Append an entry to this section using NULL terminated chars */ - void Append(const char* n, const char* b) - { - this->Entries.emplace_back(n, b); - } - /** prepend some documentation to this section */ template void Prepend(const Iterable& entries) diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 1ca3e55cff..a15578740b 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -47,22 +47,24 @@ namespace { #ifndef CMAKE_BOOTSTRAP const cmDocumentationEntry cmDocumentationName = { - nullptr, " cmake - Cross-Platform Makefile Generator." + {}, + " cmake - Cross-Platform Makefile Generator." }; const cmDocumentationEntry cmDocumentationUsage[2] = { - { nullptr, + { {}, " cmake [options] \n" " cmake [options] \n" " cmake [options] -S -B " }, - { nullptr, + { {}, "Specify a source directory to (re-)generate a build system for " "it in the current working directory. Specify an existing build " "directory to re-generate its build system." } }; const cmDocumentationEntry cmDocumentationUsageNote = { - nullptr, "Run 'cmake --help' for more information." + {}, + "Run 'cmake --help' for more information." }; const cmDocumentationEntry cmDocumentationOptions[31] = { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index d26a0d7992..fa38a650fb 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -19,11 +19,11 @@ namespace { const cmDocumentationEntry cmDocumentationName = { - nullptr, " ctest - Testing driver provided by CMake." + {}, + " ctest - Testing driver provided by CMake." }; -const cmDocumentationEntry cmDocumentationUsage = { nullptr, - " ctest [options]" }; +const cmDocumentationEntry cmDocumentationUsage = { {}, " ctest [options]" }; const cmDocumentationEntry cmDocumentationOptions[74] = { { "--preset , --preset=",