diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-23 10:05:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-11-23 10:09:54 (GMT) |
commit | 5eb4d7590e0e721b56fc735ab6da35d55ad339d0 (patch) | |
tree | e7edc44c5913f7647c46fa1a9df0472b3000ece2 /Source/CPack | |
parent | 2a0c65485854bb6e6a33a7d5acd99c936adacec6 (diff) | |
download | CMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.zip CMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.tar.gz CMake-5eb4d7590e0e721b56fc735ab6da35d55ad339d0.tar.bz2 |
Remove some unneeded c_str calls.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackComponentGroup.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Source/CPack/cmCPackComponentGroup.cxx b/Source/CPack/cmCPackComponentGroup.cxx index 77f11cb..fd20e9b 100644 --- a/Source/CPack/cmCPackComponentGroup.cxx +++ b/Source/CPack/cmCPackComponentGroup.cxx @@ -30,7 +30,7 @@ unsigned long cmCPackComponent::GetInstalledSize( std::string path = installDir; path += '/'; path += *fileIt; - this->TotalSize += cmSystemTools::FileLength(path.c_str()); + this->TotalSize += cmSystemTools::FileLength(path); } return this->TotalSize; diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index c939cd2..0a64bd5 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -390,7 +390,7 @@ int cmCPackDebGenerator::createDeb() packageFiles.begin(); fileIt != packageFiles.end(); ++ fileIt ) { - totalSize += cmSystemTools::FileLength(fileIt->c_str()); + totalSize += cmSystemTools::FileLength(*fileIt); } } out << "Installed-Size: " << (totalSize + 1023) / 1024 << "\n"; diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 31f0b59..e78f161 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -217,7 +217,7 @@ int cmCPackGenerator::InstallProject() { std::string destDir = "DESTDIR="; destDir += tempInstallDirectory; - cmSystemTools::PutEnv(destDir.c_str()); + cmSystemTools::PutEnv(destDir); } else { @@ -277,7 +277,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands( { std::string tempInstallDirectoryEnv = "CMAKE_INSTALL_PREFIX="; tempInstallDirectoryEnv += tempInstallDirectory; - cmSystemTools::PutEnv(tempInstallDirectoryEnv.c_str()); + cmSystemTools::PutEnv(tempInstallDirectoryEnv); std::vector<std::string> installCommandsVector; cmSystemTools::ExpandListArgument(installCommands,installCommandsVector); std::vector<std::string>::iterator it; @@ -404,7 +404,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( std::string targetFile; std::string inFileRelative = cmSystemTools::RelativePath(top.c_str(),inFile.c_str()); - cmSystemTools::ReadSymlink(inFile.c_str(),targetFile); + cmSystemTools::ReadSymlink(inFile,targetFile); symlinkedFiles.push_back(std::pair<std::string, std::string>(targetFile,inFileRelative)); } @@ -437,8 +437,8 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( cmCPackLogger(cmCPackLog::LOG_DEBUG, "Will create a symlink: " << symlinkedIt->second << "--> " << symlinkedIt->first << std::endl); - if (!cmSystemTools::CreateSymlink((symlinkedIt->first).c_str(), - (symlinkedIt->second).c_str())) + if (!cmSystemTools::CreateSymlink(symlinkedIt->first, + symlinkedIt->second)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create symlink: " << symlinkedIt->second << "--> " @@ -787,7 +787,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( * in order to put things in subdirs... */ cmSystemTools::PutEnv( - (std::string("DESTDIR=")+tempInstallDirectory).c_str() + std::string("DESTDIR=")+tempInstallDirectory ); cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Creating directory: '" << dir << "'" << std::endl); diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index c1fff7d..b506b06 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -825,7 +825,7 @@ CreateComponentDescription(cmCPackComponent *component, } out << std::endl; - totalSize += cmSystemTools::FileLength((dirName + *fileIt).c_str()); + totalSize += cmSystemTools::FileLength(dirName + *fileIt); } } |