cmDocumentationSection: Remove unused parameter in constructor

This commit is contained in:
Artur Ryt 2018-11-30 20:08:44 +01:00 committed by Brad King
parent 5a283b79e5
commit 4308eb3d16
2 changed files with 10 additions and 16 deletions

View File

@ -176,7 +176,7 @@ void cmDocumentation::addCommonStandardDocSections()
{ {
cmDocumentationSection* sec; cmDocumentationSection* sec;
sec = new cmDocumentationSection("Options", "OPTIONS"); sec = new cmDocumentationSection("Options");
sec->Append(cmDocumentationStandardOptions); sec->Append(cmDocumentationStandardOptions);
this->AllSections["Options"] = sec; this->AllSections["Options"] = sec;
} }
@ -185,7 +185,7 @@ void cmDocumentation::addCMakeStandardDocSections()
{ {
cmDocumentationSection* sec; cmDocumentationSection* sec;
sec = new cmDocumentationSection("Generators", "GENERATORS"); sec = new cmDocumentationSection("Generators");
sec->Append(cmDocumentationGeneratorsHeader); sec->Append(cmDocumentationGeneratorsHeader);
this->AllSections["Generators"] = sec; this->AllSections["Generators"] = sec;
} }
@ -201,7 +201,7 @@ void cmDocumentation::addCPackStandardDocSections()
{ {
cmDocumentationSection* sec; cmDocumentationSection* sec;
sec = new cmDocumentationSection("Generators", "GENERATORS"); sec = new cmDocumentationSection("Generators");
sec->Append(cmDocumentationGeneratorsHeader); sec->Append(cmDocumentationGeneratorsHeader);
this->AllSections["Generators"] = sec; this->AllSections["Generators"] = sec;
} }
@ -375,16 +375,14 @@ void cmDocumentation::SetSection(const char* name,
void cmDocumentation::SetSection(const char* name, void cmDocumentation::SetSection(const char* name,
std::vector<cmDocumentationEntry>& docs) std::vector<cmDocumentationEntry>& docs)
{ {
cmDocumentationSection* sec = cmDocumentationSection* sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
sec->Append(docs); sec->Append(docs);
this->SetSection(name, sec); this->SetSection(name, sec);
} }
void cmDocumentation::SetSection(const char* name, const char* docs[][2]) void cmDocumentation::SetSection(const char* name, const char* docs[][2])
{ {
cmDocumentationSection* sec = cmDocumentationSection* sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
sec->Append(docs); sec->Append(docs);
this->SetSection(name, sec); this->SetSection(name, sec);
} }
@ -401,8 +399,7 @@ void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
{ {
cmDocumentationSection* sec = nullptr; cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) { if (this->AllSections.find(name) == this->AllSections.end()) {
sec = sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
this->SetSection(name, sec); this->SetSection(name, sec);
} else { } else {
sec = this->AllSections[name]; sec = this->AllSections[name];
@ -415,8 +412,7 @@ void cmDocumentation::PrependSection(const char* name,
{ {
cmDocumentationSection* sec = nullptr; cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) { if (this->AllSections.find(name) == this->AllSections.end()) {
sec = sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
this->SetSection(name, sec); this->SetSection(name, sec);
} else { } else {
sec = this->AllSections[name]; sec = this->AllSections[name];
@ -428,8 +424,7 @@ void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
{ {
cmDocumentationSection* sec = nullptr; cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) { if (this->AllSections.find(name) == this->AllSections.end()) {
sec = sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
this->SetSection(name, sec); this->SetSection(name, sec);
} else { } else {
sec = this->AllSections[name]; sec = this->AllSections[name];
@ -442,8 +437,7 @@ void cmDocumentation::AppendSection(const char* name,
{ {
cmDocumentationSection* sec = nullptr; cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) { if (this->AllSections.find(name) == this->AllSections.end()) {
sec = sec = new cmDocumentationSection(name);
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
this->SetSection(name, sec); this->SetSection(name, sec);
} else { } else {
sec = this->AllSections[name]; sec = this->AllSections[name];

View File

@ -19,7 +19,7 @@ class cmDocumentationSection
{ {
public: public:
/** Create a cmSection, with a special name for man-output mode. */ /** Create a cmSection, with a special name for man-output mode. */
cmDocumentationSection(const char* name, const char*) explicit cmDocumentationSection(const char* name)
: Name(name) : Name(name)
{ {
} }