diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-10-15 12:54:05 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-10-15 12:54:05 (GMT) |
commit | cc1139cc304b6bd4c8403d437cf08f73e06e243a (patch) | |
tree | e9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/CTest/cmCTestMultiProcessHandler.cxx | |
parent | 1b3495d32e1523648da08e138482a654f8765333 (diff) | |
download | CMake-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/CTest/cmCTestMultiProcessHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 7ba434c..4c89caa 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -123,7 +123,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) testRun->SetTestProperties(this->Properties[test]); std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); - cmSystemTools::ChangeDirectory(this->Properties[test]->Directory.c_str()); + cmSystemTools::ChangeDirectory(this->Properties[test]->Directory); // Lock the resources we'll be using this->LockResources(test); @@ -156,7 +156,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) this->Failed->push_back(this->Properties[test]->Name); delete testRun; } - cmSystemTools::ChangeDirectory(current_dir.c_str()); + cmSystemTools::ChangeDirectory(current_dir); } //--------------------------------------------------------- @@ -334,7 +334,7 @@ void cmCTestMultiProcessHandler::UpdateCostData() { if(line == "---") break; std::vector<cmsys::String> parts = - cmSystemTools::SplitString(line.c_str(), ' '); + cmSystemTools::SplitString(line, ' '); //Format: <name> <previous_runs> <avg_cost> if(parts.size() < 3) break; @@ -357,7 +357,7 @@ void cmCTestMultiProcessHandler::UpdateCostData() } } fin.close(); - cmSystemTools::RemoveFile(fname.c_str()); + cmSystemTools::RemoveFile(fname); } // Add all tests not previously listed in the file @@ -393,7 +393,7 @@ void cmCTestMultiProcessHandler::ReadCostData() if(line == "---") break; std::vector<cmsys::String> parts = - cmSystemTools::SplitString(line.c_str(), ' '); + cmSystemTools::SplitString(line, ' '); // Probably an older version of the file, will be fixed next run if(parts.size() < 3) @@ -621,7 +621,7 @@ void cmCTestMultiProcessHandler::MarkFinished() { std::string fname = this->CTest->GetBinaryDir() + "/Testing/Temporary/CTestCheckpoint.txt"; - cmSystemTools::RemoveFile(fname.c_str()); + cmSystemTools::RemoveFile(fname); } //--------------------------------------------------------- @@ -639,7 +639,7 @@ void cmCTestMultiProcessHandler::PrintTestList() //push working dir std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); - cmSystemTools::ChangeDirectory(p.Directory.c_str()); + cmSystemTools::ChangeDirectory(p.Directory); cmCTestRunTest testRun(this->TestHandler); testRun.SetIndex(p.Index); @@ -676,7 +676,7 @@ void cmCTestMultiProcessHandler::PrintTestList() cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl); //pop working dir - cmSystemTools::ChangeDirectory(current_dir.c_str()); + cmSystemTools::ChangeDirectory(current_dir); } cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: " @@ -735,7 +735,7 @@ void cmCTestMultiProcessHandler::CheckResume() } else if(cmSystemTools::FileExists(fname.c_str(), true)) { - cmSystemTools::RemoveFile(fname.c_str()); + cmSystemTools::RemoveFile(fname); } } |