summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePolicyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCMakePolicyCommand.cxx')
-rw-r--r--Source/cmCMakePolicyCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx
index f4be559..ddd5d6a 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -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: