cmSystemTools: copy file member functions accept std::string params

Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
This commit is contained in:
Vitaly Stakhovsky
2019-01-29 10:34:18 -05:00
parent 9620cb935a
commit c31b6e616d
11 changed files with 18 additions and 33 deletions
+2 -4
View File
@@ -3750,8 +3750,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
}
if (copyonly) {
if (!cmSystemTools::CopyFileIfDifferent(sinfile.c_str(),
soutfile.c_str())) {
if (!cmSystemTools::CopyFileIfDifferent(sinfile, soutfile)) {
return 0;
}
} else {
@@ -3802,8 +3801,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
// close the files before attempting to copy
fin.close();
fout.close();
if (!cmSystemTools::CopyFileIfDifferent(tempOutputFile.c_str(),
soutfile.c_str())) {
if (!cmSystemTools::CopyFileIfDifferent(tempOutputFile, soutfile)) {
res = 0;
} else {
cmSystemTools::SetPermissions(soutfile, perm);