summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-10-15 12:54:05 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-10-15 12:54:05 (GMT)
commitcc1139cc304b6bd4c8403d437cf08f73e06e243a (patch)
treee9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/cmCTest.cxx
parent1b3495d32e1523648da08e138482a654f8765333 (diff)
downloadCMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.zip
CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.gz
CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.bz2
strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index a7905a4..f88f72c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -208,7 +208,7 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method,
return -1;
}
::curl_easy_setopt(curl, CURLOPT_PUT, 1);
- file = cmsys::SystemTools::Fopen(putFile.c_str(), "rb");
+ file = cmsys::SystemTools::Fopen(putFile, "rb");
::curl_easy_setopt(curl, CURLOPT_INFILE, file);
//fall through to append GET fields
case cmCTest::HTTP_GET:
@@ -524,7 +524,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
std::string testingDir = this->BinaryDir + "/Testing";
if ( cmSystemTools::FileExists(testingDir.c_str()) )
{
- if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(testingDir) )
{
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir
<< " is in the place of the testing directory" << std::endl);
@@ -809,7 +809,7 @@ bool cmCTest::UpdateCTestConfiguration()
if ( !this->GetCTestConfiguration("BuildDirectory").empty() )
{
this->BinaryDir = this->GetCTestConfiguration("BuildDirectory");
- cmSystemTools::ChangeDirectory(this->BinaryDir.c_str());
+ cmSystemTools::ChangeDirectory(this->BinaryDir);
}
this->TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str());
if ( this->ProduceXML )
@@ -884,7 +884,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
}
if ( cmSystemTools::FileExists(testingDir.c_str()) )
{
- if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(testingDir) )
{
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir
<< " is in the place of the testing directory"
@@ -1061,17 +1061,17 @@ int cmCTest::ProcessTests()
if ( !notest )
{
std::string notes_dir = this->BinaryDir + "/Testing/Notes";
- if ( cmSystemTools::FileIsDirectory(notes_dir.c_str()) )
+ if ( cmSystemTools::FileIsDirectory(notes_dir) )
{
cmsys::Directory d;
- d.Load(notes_dir.c_str());
+ d.Load(notes_dir);
unsigned long kk;
for ( kk = 0; kk < d.GetNumberOfFiles(); kk ++ )
{
const char* file = d.GetFile(kk);
std::string fullname = notes_dir + "/" + file;
if ( cmSystemTools::FileExists(fullname.c_str()) &&
- !cmSystemTools::FileIsDirectory(fullname.c_str()) )
+ !cmSystemTools::FileIsDirectory(fullname) )
{
if ( this->NotesFiles.size() > 0 )
{
@@ -1294,7 +1294,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"Test timeout computed to be: " << timeout << "\n");
if(cmSystemTools::SameFile(
- argv[0], cmSystemTools::GetCTestCommand().c_str()) &&
+ argv[0], cmSystemTools::GetCTestCommand()) &&
!this->ForceNewCTestProcess)
{
cmCTest inst;
@@ -1342,7 +1342,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{
*log << *output;
}
- cmSystemTools::ChangeDirectory(oldpath.c_str());
+ cmSystemTools::ChangeDirectory(oldpath);
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"Internal cmCTest object used to run test." << std::endl
@@ -1681,7 +1681,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
return "";
}
std::string base64 = this->Base64EncodeFile(tarFile);
- cmSystemTools::RemoveFile(tarFile.c_str());
+ cmSystemTools::RemoveFile(tarFile);
return base64;
}
@@ -2628,10 +2628,10 @@ std::string cmCTest::GetShortPathToFile(const char* cfname)
{
const std::string& sourceDir
= cmSystemTools::CollapseFullPath(
- this->GetCTestConfiguration("SourceDirectory").c_str());
+ this->GetCTestConfiguration("SourceDirectory"));
const std::string& buildDir
= cmSystemTools::CollapseFullPath(
- this->GetCTestConfiguration("BuildDirectory").c_str());
+ this->GetCTestConfiguration("BuildDirectory"));
std::string fname = cmSystemTools::CollapseFullPath(cfname);
// Find relative paths to both directories