From ce549909fbed7ae5567099d0f9ea2e452119181b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 26 Jul 2023 15:42:08 -0400 Subject: cmCPackPKGGenerator: remove unnecessary `.c_str()` calls --- Source/CPack/cmCPackPKGGenerator.cxx | 11 +++++------ 1 file 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 : "") - << ".rtf, " << name << ".html, or " << name - << ".txt file" << std::endl); + "CPack option: " + << cpackVar << " not specified. It should point to " + << (!name.empty() ? name : "") << ".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); -- cgit v0.12