mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
26 lines
596 B
C++
26 lines
596 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#pragma once
|
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
#include <string>
|
|
|
|
/** Standard documentation entry for cmDocumentation's formatting. */
|
|
struct cmDocumentationEntry
|
|
{
|
|
std::string Name;
|
|
std::string Brief;
|
|
char CustomNamePrefix = ' ';
|
|
cmDocumentationEntry() = default;
|
|
cmDocumentationEntry(const char* const n, const char* const b)
|
|
{
|
|
if (n) {
|
|
this->Name = n;
|
|
}
|
|
if (b) {
|
|
this->Brief = b;
|
|
}
|
|
}
|
|
};
|