summaryrefslogtreecommitdiff
path: root/Source/cmAddTestCommand.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/cmAddTestCommand.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/cmAddTestCommand.cxx')
-rw-r--r--Source/cmAddTestCommand.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx
index a9165f5b12..2531a1a76d 100644
--- a/Source/cmAddTestCommand.cxx
+++ b/Source/cmAddTestCommand.cxx
@@ -44,7 +44,7 @@ bool cmAddTestCommand
// Create the test but add a generator only the first time it is
// seen. This preserves behavior from before test generators.
- cmTest* test = this->Makefile->GetTest(args[0].c_str());
+ cmTest* test = this->Makefile->GetTest(args[0]);
if(test)
{
// If the test was already added by a new-style signature do not
@@ -54,13 +54,13 @@ bool cmAddTestCommand
cmOStringStream e;
e << " given test name \"" << args[0]
<< "\" which already exists in this directory.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
}
else
{
- test = this->Makefile->CreateTest(args[0].c_str());
+ test = this->Makefile->CreateTest(args[0]);
test->SetOldStyle(true);
this->Makefile->AddTestGenerator(new cmTestGenerator(test));
}
@@ -137,7 +137,7 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
{
cmOStringStream e;
e << " given unknown argument:\n " << args[i] << "\n";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
}
@@ -157,17 +157,17 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
}
// Require a unique test name within the directory.
- if(this->Makefile->GetTest(name.c_str()))
+ if(this->Makefile->GetTest(name))
{
cmOStringStream e;
e << " given test NAME \"" << name
<< "\" which already exists in this directory.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
// Add the test.
- cmTest* test = this->Makefile->CreateTest(name.c_str());
+ cmTest* test = this->Makefile->CreateTest(name);
test->SetOldStyle(false);
test->SetCommand(command);
if(!working_directory.empty())