From 4e62784bf6c00bc01fd21dc08cac84b260ec9c11 Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 9 Sep 2012 10:55:22 -0400 Subject: [PATCH] docbook: Fix formatter naming convention to avoid shadow Some compilers complain: cmDocumentationFormatterDocbook.cxx: In member function virtual void cmDocumentationFormatterDocbook::PrintHeader(const char*, const char*, std::ostream&): cmDocumentationFormatterDocbook.cxx:197:73: warning: declaration of docname shadows a member of 'this' [-Wshadow] Fix the name of the member variable. --- Source/cmDocumentationFormatterDocbook.cxx | 4 ++-- Source/cmDocumentationFormatterDocbook.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmDocumentationFormatterDocbook.cxx b/Source/cmDocumentationFormatterDocbook.cxx index 9ff784701..a2ae20b15 100644 --- a/Source/cmDocumentationFormatterDocbook.cxx +++ b/Source/cmDocumentationFormatterDocbook.cxx @@ -196,7 +196,7 @@ void cmDocumentationFormatterDocbook void cmDocumentationFormatterDocbook ::PrintHeader(const char* docname, const char* appname, std::ostream& os) { - this->docname = docname; + this->Docname = docname; // this one is used to ensure that we don't create multiple link targets // with the same name. We can clear it here since we are at the @@ -229,7 +229,7 @@ void cmDocumentationFormatterDocbook { id = std::string(prefix) + "." + id; } - os << this->docname << '.' << id; + os << this->Docname << '.' << id; // make sure that each id exists only once. Since it seems // not easily possible to determine which link refers to which id, diff --git a/Source/cmDocumentationFormatterDocbook.h b/Source/cmDocumentationFormatterDocbook.h index 6c969002f..0352d342a 100644 --- a/Source/cmDocumentationFormatterDocbook.h +++ b/Source/cmDocumentationFormatterDocbook.h @@ -37,7 +37,7 @@ public: private: void PrintId(std::ostream& os, const char* prefix, std::string id); std::set EmittedLinkIds; - std::string docname; + std::string Docname; }; #endif