summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-23 10:05:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-11-23 10:09:54 (GMT)
commit5eb4d7590e0e721b56fc735ab6da35d55ad339d0 (patch)
treee7edc44c5913f7647c46fa1a9df0472b3000ece2 /Source/CTest
parent2a0c65485854bb6e6a33a7d5acd99c936adacec6 (diff)
downloadCMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.zip
CMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.tar.gz
CMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.tar.bz2
Remove some unneeded c_str calls.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx2
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx16
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx4
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx2
-rw-r--r--Source/CTest/cmParseBlanketJSCoverage.cxx6
6 files changed, 16 insertions, 16 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 5e8f8f0..d226a6c 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -828,7 +828,7 @@ cmCTestBuildHandler::LaunchHelper::LaunchHelper(cmCTestBuildHandler* handler):
this->WriteLauncherConfig();
std::string launchEnv = "CTEST_LAUNCH_LOGS=";
launchEnv += launchDir;
- cmSystemTools::PutEnv(launchEnv.c_str());
+ cmSystemTools::PutEnv(launchEnv);
}
}
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 8dc22a8..e782886 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -884,7 +884,7 @@ struct cmCTestCoverageHandlerLocale
{
if(!lc_all.empty())
{
- cmSystemTools::PutEnv(("LC_ALL=" + lc_all).c_str());
+ cmSystemTools::PutEnv("LC_ALL=" + lc_all);
}
else
{
@@ -1491,24 +1491,24 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
lcovExtraFlags + " ";
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Current coverage dir: "
- << fileDir.c_str() << std::endl);
+ << fileDir << std::endl);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
<< std::endl);
std::string output = "";
std::string errors = "";
int retVal = 0;
- *cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl;
- *cont->OFS << " Command: " << command.c_str() << std::endl;
+ *cont->OFS << "* Run coverage for: " << fileDir << std::endl;
+ *cont->OFS << " Command: " << command << std::endl;
int res = this->CTest->RunCommand(command.c_str(), &output, &errors,
&retVal, fileDir.c_str(), 0 /*this->TimeOut*/);
- *cont->OFS << " Output: " << output.c_str() << std::endl;
- *cont->OFS << " Errors: " << errors.c_str() << std::endl;
+ *cont->OFS << " Output: " << output << std::endl;
+ *cont->OFS << " Errors: " << errors << std::endl;
if ( ! res )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Problem running coverage on file: " << it->c_str() << std::endl);
+ "Problem running coverage on file: " << *it << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << errors << std::endl);
cont->Error ++;
@@ -1517,7 +1517,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
if ( retVal != 0 )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
- << retVal << " while processing: " << it->c_str() << std::endl);
+ << retVal << " while processing: " << *it << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << cont->Error << std::endl);
}
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 5f065c2..6aa1c2b 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -234,7 +234,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
::curl_global_cleanup();
return false;
}
- unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
+ unsigned long filelen = cmSystemTools::FileLength(local_file);
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
*this->LogFile << "\tUpload file: " << local_file << " to "
@@ -475,7 +475,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
::curl_global_cleanup();
return false;
}
- unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
+ unsigned long filelen = cmSystemTools::FileLength(local_file);
ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 435fb32..f330e58 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1939,7 +1939,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
cmCTest::CleanString(measurementfile.match(5));
if ( cmSystemTools::FileExists(filename.c_str()) )
{
- long len = cmSystemTools::FileLength(filename.c_str());
+ long len = cmSystemTools::FileLength(filename);
if ( len == 0 )
{
std::string k1 = measurementfile.match(1);
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 68f5fe1..7206914 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -98,7 +98,7 @@ cmCTestUpdateHandlerLocale::~cmCTestUpdateHandlerLocale()
{
std::string put = "LC_MESSAGES=";
put += saveLCMessages;
- cmSystemTools::PutEnv(put.c_str());
+ cmSystemTools::PutEnv(put);
}
else
{
diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx
index 5f4a708..fc90bc1 100644
--- a/Source/CTest/cmParseBlanketJSCoverage.cxx
+++ b/Source/CTest/cmParseBlanketJSCoverage.cxx
@@ -78,7 +78,7 @@ public:
* information in the local vector
*/
FileLinesType& CoverageVector =
- this->Coverage.TotalCoverage[filename.c_str()];
+ this->Coverage.TotalCoverage[filename];
CoverageVector = localCoverageVector;
localCoverageVector.clear();
foundFile=false;
@@ -98,7 +98,7 @@ public:
* FoundFile and foundSource ensure that
* only the value of the line coverage is captured
*/
- std::string result = getValue(line,1).c_str();
+ std::string result = getValue(line,1);
result = result.substr(2,result.npos);
if(result == "\"\"")
{
@@ -120,7 +120,7 @@ public:
// On exit, capture end of last file covered.
FileLinesType& CoverageVector =
- this->Coverage.TotalCoverage[filename.c_str()];
+ this->Coverage.TotalCoverage[filename];
CoverageVector = localCoverageVector;
foundFile=false;
localCoverageVector.clear();