summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-29 15:34:18 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-29 15:34:18 (GMT)
commitc31b6e616d5c2d697696540ca2e8faf14160d2b0 (patch)
treebf4f82b41e5fd8a2d5f5fd76e80eb6f8e24e0e1b /Source/CPack
parent9620cb935a49e7b4955f5b1d0ffa2e93b4327591 (diff)
downloadCMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.zip
CMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.tar.gz
CMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.tar.bz2
cmSystemTools: copy file member functions accept std::string params
Cleaned up `c_str()`s. `cmSystemTools::CopyFileIfDifferent()` removed as redundant.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx3
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackGenerator.cxx6
3 files changed, 4 insertions, 8 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 8f492af..f12a452 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -288,8 +288,7 @@ protected:
content = cmSystemTools::TrimWhitespace(content);
std::string source = this->basePath + "/" + content;
std::string destination = this->path + "/" + content;
- if (!cmSystemTools::CopyFileIfDifferent(source.data(),
- destination.data())) {
+ if (!cmSystemTools::CopyFileIfDifferent(source, destination)) {
this->hasErrors = true;
}
}
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index be4a18e..c55b148 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -212,8 +212,7 @@ int cmCPackDragNDropGenerator::PackageFiles()
bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
std::ostringstream& target)
{
- if (!cmSystemTools::CopyFileIfDifferent(source.str().c_str(),
- target.str().c_str())) {
+ if (!cmSystemTools::CopyFileIfDifferent(source.str(), target.str())) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying " << source.str() << " to " << target.str()
<< std::endl);
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 4728f69..90d38fc 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -392,8 +392,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
std::move(inFileRelative));
}
/* If it is not a symlink then do a plain copy */
- else if (!(cmSystemTools::CopyFileIfDifferent(inFile.c_str(),
- filePath.c_str()) &&
+ else if (!(cmSystemTools::CopyFileIfDifferent(inFile, filePath) &&
cmSystemTools::CopyFileTime(inFile.c_str(),
filePath.c_str()))) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
@@ -1077,8 +1076,7 @@ int cmCPackGenerator::DoPackage()
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
<< " to " << (packageFileName ? packageFileName : "(NULL)")
<< std::endl);
- if (!cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
- packageFileName)) {
+ if (!cmSystemTools::CopyFileIfDifferent(pkgFileName, tmpPF)) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
"Problem copying the package: "