summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-26 19:42:08 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-30 22:33:07 (GMT)
commitce549909fbed7ae5567099d0f9ea2e452119181b (patch)
treedc77cd3a3d26b3e7460e777b00e974bce09e27c4 /Source/CPack
parente48dbbf048604397ec00a2f95600e57b57634577 (diff)
downloadCMake-ce549909fbed7ae5567099d0f9ea2e452119181b.zip
CMake-ce549909fbed7ae5567099d0f9ea2e452119181b.tar.gz
CMake-ce549909fbed7ae5567099d0f9ea2e452119181b.tar.bz2
cmCPackPKGGenerator: remove unnecessary `.c_str()` calls
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackPKGGenerator.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx
index 76ef091..554cfcd 100644
--- a/Source/CPack/cmCPackPKGGenerator.cxx
+++ b/Source/CPack/cmCPackPKGGenerator.cxx
@@ -385,11 +385,10 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
cmValue inFileName = this->GetOption(cpackVar);
if (!inFileName) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "CPack option: " << cpackVar.c_str()
- << " not specified. It should point to "
- << (!name.empty() ? name : "<empty>")
- << ".rtf, " << name << ".html, or " << name
- << ".txt file" << std::endl);
+ "CPack option: "
+ << cpackVar << " not specified. It should point to "
+ << (!name.empty() ? name : "<empty>") << ".rtf, " << name
+ << ".html, or " << name << ".txt file" << std::endl);
return false;
}
if (!cmSystemTools::FileExists(inFileName)) {
@@ -454,7 +453,7 @@ int cmCPackPKGGenerator::CopyInstallScript(const std::string& resdir,
{
std::string dst = cmStrCat(resdir, '/', name);
cmSystemTools::CopyFileAlways(script, dst);
- cmSystemTools::SetPermissions(dst.c_str(), 0777);
+ cmSystemTools::SetPermissions(dst, 0777);
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"copy script : " << script << "\ninto " << dst << std::endl);