summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Ryt <artur.ryt@gmail.com>2018-11-30 19:08:44 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-11 19:51:30 (GMT)
commit4308eb3d165dfc473182021c12ec877e388f60a2 (patch)
treee9755be87f244180041f9d3b56832fa0499ece50
parent5a283b79e5fe1739142cc513a9a701855849b2f8 (diff)
downloadCMake-4308eb3d165dfc473182021c12ec877e388f60a2.zip
CMake-4308eb3d165dfc473182021c12ec877e388f60a2.tar.gz
CMake-4308eb3d165dfc473182021c12ec877e388f60a2.tar.bz2
cmDocumentationSection: Remove unused parameter in constructor
-rw-r--r--Source/cmDocumentation.cxx24
-rw-r--r--Source/cmDocumentationSection.h2
2 files changed, 10 insertions, 16 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 2dfba04..a85a134 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -176,7 +176,7 @@ void cmDocumentation::addCommonStandardDocSections()
{
cmDocumentationSection* sec;
- sec = new cmDocumentationSection("Options", "OPTIONS");
+ sec = new cmDocumentationSection("Options");
sec->Append(cmDocumentationStandardOptions);
this->AllSections["Options"] = sec;
}
@@ -185,7 +185,7 @@ void cmDocumentation::addCMakeStandardDocSections()
{
cmDocumentationSection* sec;
- sec = new cmDocumentationSection("Generators", "GENERATORS");
+ sec = new cmDocumentationSection("Generators");
sec->Append(cmDocumentationGeneratorsHeader);
this->AllSections["Generators"] = sec;
}
@@ -201,7 +201,7 @@ void cmDocumentation::addCPackStandardDocSections()
{
cmDocumentationSection* sec;
- sec = new cmDocumentationSection("Generators", "GENERATORS");
+ sec = new cmDocumentationSection("Generators");
sec->Append(cmDocumentationGeneratorsHeader);
this->AllSections["Generators"] = sec;
}
@@ -375,16 +375,14 @@ void cmDocumentation::SetSection(const char* name,
void cmDocumentation::SetSection(const char* name,
std::vector<cmDocumentationEntry>& docs)
{
- cmDocumentationSection* sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ cmDocumentationSection* sec = new cmDocumentationSection(name);
sec->Append(docs);
this->SetSection(name, sec);
}
void cmDocumentation::SetSection(const char* name, const char* docs[][2])
{
- cmDocumentationSection* sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ cmDocumentationSection* sec = new cmDocumentationSection(name);
sec->Append(docs);
this->SetSection(name, sec);
}
@@ -401,8 +399,7 @@ void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
{
cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) {
- sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ sec = new cmDocumentationSection(name);
this->SetSection(name, sec);
} else {
sec = this->AllSections[name];
@@ -415,8 +412,7 @@ void cmDocumentation::PrependSection(const char* name,
{
cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) {
- sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ sec = new cmDocumentationSection(name);
this->SetSection(name, sec);
} else {
sec = this->AllSections[name];
@@ -428,8 +424,7 @@ void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
{
cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) {
- sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ sec = new cmDocumentationSection(name);
this->SetSection(name, sec);
} else {
sec = this->AllSections[name];
@@ -442,8 +437,7 @@ void cmDocumentation::AppendSection(const char* name,
{
cmDocumentationSection* sec = nullptr;
if (this->AllSections.find(name) == this->AllSections.end()) {
- sec =
- new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+ sec = new cmDocumentationSection(name);
this->SetSection(name, sec);
} else {
sec = this->AllSections[name];
diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h
index d9e8187..7031b52 100644
--- a/Source/cmDocumentationSection.h
+++ b/Source/cmDocumentationSection.h
@@ -19,7 +19,7 @@ class cmDocumentationSection
{
public:
/** Create a cmSection, with a special name for man-output mode. */
- cmDocumentationSection(const char* name, const char*)
+ explicit cmDocumentationSection(const char* name)
: Name(name)
{
}