summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-17 17:36:07 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-17 17:36:07 (GMT)
commit25caf7bafeb18d9394eb2d13686970c68e9ad88c (patch)
tree11fe6f264cf7b71fe62d725d0c345a10811ed612 /Source/cmCTest.cxx
parent68e20f674a48be38d60e129f600faf7c483f2b97 (diff)
downloadCMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.zip
CMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.tar.gz
CMake-25caf7bafeb18d9394eb2d13686970c68e9ad88c.tar.bz2
cmMakefile::ReadListFile() accepts std::string argument
Same for cmMakefile::ReadDependentFile(); some cleanup
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1c0d9f6..cd9cbfb 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -640,7 +640,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
" Reading ctest configuration file: " << fname
<< std::endl,
command->ShouldBeQuiet());
- bool readit = mf->ReadDependentFile(fname.c_str());
+ bool readit = mf->ReadDependentFile(fname);
if (!readit) {
std::string m = "Could not find include file: ";
m += fname;
@@ -2469,8 +2469,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
cmSystemTools::ResetErrorOccuredFlag();
- if (!mf->ReadListFile(fname.c_str()) ||
- cmSystemTools::GetErrorOccuredFlag()) {
+ if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccuredFlag()) {
cmCTestLog(this, ERROR_MESSAGE,
"Problem reading custom configuration: " << fname
<< std::endl);
@@ -2489,15 +2488,13 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
gl.RecurseOn();
gl.FindFiles(rexpr);
std::vector<std::string>& files = gl.GetFiles();
- std::vector<std::string>::iterator fileIt;
- for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
+ for (const std::string& file : files) {
cmCTestLog(this, DEBUG,
- "* Read custom CTest configuration file: " << *fileIt
+ "* Read custom CTest configuration file: " << file
<< std::endl);
- if (!mf->ReadListFile(fileIt->c_str()) ||
- cmSystemTools::GetErrorOccuredFlag()) {
+ if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccuredFlag()) {
cmCTestLog(this, ERROR_MESSAGE,
- "Problem reading custom configuration: " << *fileIt
+ "Problem reading custom configuration: " << file
<< std::endl);
}
}