diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-04 02:04:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:30 (GMT) |
commit | 9f48d3bac22118fc1dddbf1eec6da4cb24c585c4 (patch) | |
tree | 25a33c0250d6b3a5c9a7f602f91e4f5cd642bb7a /Source/CPack/cmCPackGenerator.cxx | |
parent | 971eb4d56e3d3c9bc11acf6082e21d5388d808bb (diff) | |
download | CMake-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/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index b46fd86..bed3891 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1482,8 +1482,8 @@ bool cmCPackGenerator::WantsComponentInstallation() const //---------------------------------------------------------------------- cmCPackInstallationType* -cmCPackGenerator::GetInstallationType(const char *projectName, - const char *name) +cmCPackGenerator::GetInstallationType(const std::string& projectName, + const std::string& name) { (void) projectName; bool hasInstallationType = this->InstallationTypes.count(name) != 0; @@ -1514,7 +1514,8 @@ cmCPackGenerator::GetInstallationType(const char *projectName, //---------------------------------------------------------------------- cmCPackComponent* -cmCPackGenerator::GetComponent(const char *projectName, const char *name) +cmCPackGenerator::GetComponent(const std::string& projectName, + const std::string& name) { bool hasComponent = this->Components.count(name) != 0; cmCPackComponent *component = &this->Components[name]; @@ -1582,7 +1583,7 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) ++installTypesIt) { component->InstallationTypes.push_back( - this->GetInstallationType(projectName, installTypesIt->c_str())); + this->GetInstallationType(projectName, *installTypesIt)); } } @@ -1609,7 +1610,8 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name) //---------------------------------------------------------------------- cmCPackComponentGroup* -cmCPackGenerator::GetComponentGroup(const char *projectName, const char *name) +cmCPackGenerator::GetComponentGroup(const std::string& projectName, + const std::string& name) { (void) projectName; std::string macroPrefix = "CPACK_COMPONENT_GROUP_" |