From 38c7544578f4154dfaaa0a55b118b79b11ec6ae1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Feb 2014 15:35:30 -0500 Subject: stringapi: Use strings for documentation names --- Source/cmDocumentation.cxx | 4 ++-- Source/cmDocumentation.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 9c27fc1..96b5f04 100644 --- a/Source/cmDocumentation.cxx +++ b/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; } //---------------------------------------------------------------------------- diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index d5a7dd5..56a4151 100644 --- a/Source/cmDocumentation.h +++ b/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 */ -- cgit v0.12