From d76a6e08d06ef0fa6d52f67e88b0cfe4d96f24d1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Feb 2014 15:37:02 -0500 Subject: stringapi: Use strings for generated file stream names --- Source/cmGeneratedFileStream.cxx | 7 +------ Source/cmGeneratedFileStream.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 34efc15..78ad4b2 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -249,12 +249,7 @@ int cmGeneratedFileStreamBase::RenameFile(const char* oldname, } //---------------------------------------------------------------------------- -void cmGeneratedFileStream::SetName(const char* fname) +void cmGeneratedFileStream::SetName(const std::string& fname) { - if ( !fname ) - { - this->Name = ""; - return; - } this->Name = fname; } diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 99f3b47..7adee7b 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -140,7 +140,7 @@ public: * Set name of the file that will hold the actual output. This method allows * the output file to be changed during the use of cmGeneratedFileStream. */ - void SetName(const char* fname); + void SetName(const std::string& fname); private: cmGeneratedFileStream(cmGeneratedFileStream const&); // not implemented -- cgit v0.12