Explorar o código

stringapi: Use strings for documentation names

Ben Boeckel %!s(int64=12) %!d(string=hai) anos
pai
achega
38c7544578
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 2 2
      Source/cmDocumentation.cxx
  2. 1 1
      Source/cmDocumentation.h

+ 2 - 2
Source/cmDocumentation.cxx

@@ -477,9 +477,9 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
 }
 
 //----------------------------------------------------------------------------
-void cmDocumentation::SetName(const char* name)
+void cmDocumentation::SetName(const std::string& name)
 {
-  this->NameString = name?name:"";
+  this->NameString = name;
 }
 
 //----------------------------------------------------------------------------

+ 1 - 1
Source/cmDocumentation.h

@@ -56,7 +56,7 @@ public:
   void SetShowGenerators(bool showGen) { this->ShowGenerators = showGen; }
 
   /** Set the program name for standard document generation.  */
-  void SetName(const char* name);
+  void SetName(const std::string& name);
 
   /** Set a section of the documentation. Typical sections include Name,
       Usage, Description, Options */