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.
This commit is contained in:
Stephen Kelly
2014-03-11 00:04:11 +01:00
parent e21ffaf8fe
commit 21c573f682
157 changed files with 1384 additions and 1384 deletions
+6 -6
View File
@@ -58,7 +58,7 @@ bool cmCMakePolicyCommand
cmOStringStream e;
e << "given unknown first argument \"" << args[0] << "\"";
this->SetError(e.str().c_str());
this->SetError(e.str());
return false;
}
@@ -84,7 +84,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
{
cmOStringStream e;
e << "SET given unrecognized policy status \"" << args[2] << "\"";
this->SetError(e.str().c_str());
this->SetError(e.str());
return false;
}
@@ -116,7 +116,7 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
cmOStringStream e;
e << "GET given policy \"" << id << "\" which is not known to this "
<< "version of CMake.";
this->SetError(e.str().c_str());
this->SetError(e.str());
return false;
}
@@ -126,15 +126,15 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
{
case cmPolicies::OLD:
// Report that the policy is set to OLD.
this->Makefile->AddDefinition(var.c_str(), "OLD");
this->Makefile->AddDefinition(var, "OLD");
break;
case cmPolicies::WARN:
// Report that the policy is not set.
this->Makefile->AddDefinition(var.c_str(), "");
this->Makefile->AddDefinition(var, "");
break;
case cmPolicies::NEW:
// Report that the policy is set to NEW.
this->Makefile->AddDefinition(var.c_str(), "NEW");
this->Makefile->AddDefinition(var, "NEW");
break;
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS: