summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGeneratorFactory.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-04 02:04:22 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:30 (GMT)
commit9f48d3bac22118fc1dddbf1eec6da4cb24c585c4 (patch)
tree25a33c0250d6b3a5c9a7f602f91e4f5cd642bb7a /Source/CPack/cmCPackGeneratorFactory.cxx
parent971eb4d56e3d3c9bc11acf6082e21d5388d808bb (diff)
downloadCMake-9f48d3bac22118fc1dddbf1eec6da4cb24c585c4.zip
CMake-9f48d3bac22118fc1dddbf1eec6da4cb24c585c4.tar.gz
CMake-9f48d3bac22118fc1dddbf1eec6da4cb24c585c4.tar.bz2
stringapi: Use strings in CPack generator parameters
Most of these are turned into strings in the body of the method (multiple times in some cases). Accept strings to simplify the API and keep string construction down.
Diffstat (limited to 'Source/CPack/cmCPackGeneratorFactory.cxx')
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index b36c2a2..9faf2b0 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -151,7 +151,8 @@ cmCPackGeneratorFactory::~cmCPackGeneratorFactory()
}
//----------------------------------------------------------------------
-cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(const char* name)
+cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
+ const std::string& name)
{
cmCPackGenerator* gen = this->NewGeneratorInternal(name);
if ( !gen )
@@ -165,12 +166,8 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(const char* name)
//----------------------------------------------------------------------
cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
- const char* name)
+ const std::string& name)
{
- if ( !name )
- {
- return 0;
- }
cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it
= this->GeneratorCreators.find(name);
if ( it == this->GeneratorCreators.end() )
@@ -181,11 +178,11 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
}
//----------------------------------------------------------------------
-void cmCPackGeneratorFactory::RegisterGenerator(const char* name,
+void cmCPackGeneratorFactory::RegisterGenerator(const std::string& name,
const char* generatorDescription,
CreateGeneratorCall* createGenerator)
{
- if ( !name || !createGenerator )
+ if ( !createGenerator )
{
cmCPack_Log(this->Logger, cmCPackLog::LOG_ERROR,
"Cannot register generator" << std::endl);