summaryrefslogtreecommitdiffstats
path: root/Source/cmExternalMakefileProjectGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-24 22:36:27 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:38 (GMT)
commit1a1b737c99ac0bd0d555fde2fadf77f08516a4ea (patch)
tree552432238277036e6d3f846d87276db507cb949d /Source/cmExternalMakefileProjectGenerator.cxx
parent24b5e93de2c753e94cae3b41c1ca7cddaa03e5e7 (diff)
downloadCMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.zip
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.gz
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.bz2
stringapi: Use strings for generator names
Diffstat (limited to 'Source/cmExternalMakefileProjectGenerator.cxx')
-rw-r--r--Source/cmExternalMakefileProjectGenerator.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx
index 0d42c35..d89a1c8 100644
--- a/Source/cmExternalMakefileProjectGenerator.cxx
+++ b/Source/cmExternalMakefileProjectGenerator.cxx
@@ -20,13 +20,13 @@ void cmExternalMakefileProjectGenerator
}
std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
- const char* globalGenerator,
- const char* extraGenerator)
+ const std::string& globalGenerator,
+ const std::string& extraGenerator)
{
std::string fullName;
- if (globalGenerator)
+ if (!globalGenerator.empty())
{
- if (extraGenerator && *extraGenerator)
+ if (!extraGenerator.empty())
{
fullName = extraGenerator;
fullName += " - ";
@@ -36,22 +36,22 @@ std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
return fullName;
}
-const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
- const char* fullName)
+std::string cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
+ const std::string& fullName)
{
// at least one global generator must be supported
assert(!this->SupportedGlobalGenerators.empty());
- if (fullName==0)
+ if (fullName.empty())
{
- return 0;
+ return "";
}
std::string currentName = fullName;
// if we get only the short name, take the first global generator as default
if (currentName == this->GetName())
{
- return this->SupportedGlobalGenerators[0].c_str();
+ return this->SupportedGlobalGenerators[0];
}
// otherwise search for the matching global generator
@@ -63,8 +63,8 @@ const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
if (this->CreateFullGeneratorName(it->c_str(), this->GetName())
== currentName)
{
- return it->c_str();
+ return *it;
}
}
- return 0;
+ return "";
}