summaryrefslogtreecommitdiff
path: root/Source/cmCommandArgumentParserHelper.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-11 00:04:11 +0100
committerStephen Kelly <steveire@gmail.com>2014-03-11 15:03:50 +0100
commit21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch)
tree8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmCommandArgumentParserHelper.cxx
parente21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff)
downloadcmake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 6284cb77c8..c9490ca53b 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -79,7 +79,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
{
if (this->EscapeQuotes)
{
- return this->AddString(cmSystemTools::EscapeQuotes(ptr).c_str());
+ return this->AddString(cmSystemTools::EscapeQuotes(ptr));
}
else
{
@@ -94,7 +94,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
{
if(this->EscapeQuotes)
{
- return this->AddString(cmSystemTools::EscapeQuotes(c).c_str());
+ return this->AddString(cmSystemTools::EscapeQuotes(c));
}
else
{
@@ -120,7 +120,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
{
cmOStringStream ostr;
ostr << this->FileLine;
- return this->AddString(ostr.str().c_str());
+ return this->AddString(ostr.str());
}
const char* value = this->Makefile->GetDefinition(var);
if(!value && !this->RemoveEmpty)
@@ -144,14 +144,14 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
bt.push_back(lfc);
msg << "uninitialized variable \'" << var << "\'";
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
- msg.str().c_str(), bt);
+ msg.str(), bt);
}
}
return 0;
}
if (this->EscapeQuotes && value)
{
- return this->AddString(cmSystemTools::EscapeQuotes(value).c_str());
+ return this->AddString(cmSystemTools::EscapeQuotes(value));
}
return this->AddString(value ? value : "");
}
@@ -181,7 +181,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var)
std::string ref = "@";
ref += var;
ref += "@";
- return this->AddString(ref.c_str());
+ return this->AddString(ref);
}
char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)