diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-09-04 14:55:05 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2016-09-04 14:55:05 (GMT) |
commit | 60dcaaea133931a323180c30eafabe4576e72cb8 (patch) | |
tree | 4f1e8855334fe41b9d98076a7c81c0963c0a526d /Source/CPack/cmCPackPKGGenerator.cxx | |
parent | fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (diff) | |
download | CMake-60dcaaea133931a323180c30eafabe4576e72cb8.zip CMake-60dcaaea133931a323180c30eafabe4576e72cb8.tar.gz CMake-60dcaaea133931a323180c30eafabe4576e72cb8.tar.bz2 |
tidy: Fix readability-redundant-string-cstr issues
Diffstat (limited to 'Source/CPack/cmCPackPKGGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackPKGGenerator.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx index 19b587a..e5b96e3 100644 --- a/Source/CPack/cmCPackPKGGenerator.cxx +++ b/Source/CPack/cmCPackPKGGenerator.cxx @@ -225,8 +225,7 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component, dirName += '/'; dirName += component.Name; dirName += this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); - unsigned long installedSize = - component.GetInstalledSizeInKbytes(dirName.c_str()); + unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName); xout.StartElement("pkg-ref"); xout.Attribute("id", packageId); @@ -283,7 +282,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, { std::string uname = cmSystemTools::UpperCase(name); std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; - const char* inFileName = this->GetOption(cpackVar.c_str()); + const char* inFileName = this->GetOption(cpackVar); if (!inFileName) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() @@ -314,7 +313,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, // Set this so that distribution.dist gets the right name (without // the path). - this->SetOption(("CPACK_RESOURCE_FILE_" + uname + "_NOPATH").c_str(), + this->SetOption("CPACK_RESOURCE_FILE_" + uname + "_NOPATH", (name + ext).c_str()); cmCPackLogger(cmCPackLog::LOG_VERBOSE, @@ -358,7 +357,7 @@ int cmCPackPKGGenerator::CopyInstallScript(const std::string& resdir, std::string dst = resdir; dst += "/"; dst += name; - cmSystemTools::CopyFileAlways(script.c_str(), dst.c_str()); + cmSystemTools::CopyFileAlways(script, dst); cmSystemTools::SetPermissions(dst.c_str(), 0777); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "copy script : " << script << "\ninto " << dst << std::endl); |