diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-10-15 12:54:05 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-10-15 12:54:05 (GMT) |
commit | cc1139cc304b6bd4c8403d437cf08f73e06e243a (patch) | |
tree | e9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/CPack/cmCPackArchiveGenerator.cxx | |
parent | 1b3495d32e1523648da08e138482a654f8765333 (diff) | |
download | CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.zip CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.gz CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.bz2 |
strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool
remove-cstr-calls on a linux build.
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 6e7b8d7..e2437b5 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -56,7 +56,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive, localToplevel += "/"+ component->Name; std::string dir = cmSystemTools::GetCurrentWorkingDirectory(); // Change to local toplevel - cmSystemTools::ChangeDirectory(localToplevel.c_str()); + cmSystemTools::ChangeDirectory(localToplevel); std::string filePrefix; if (this->IsOn("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY")) { @@ -80,7 +80,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive, } } // Go back to previous dir - cmSystemTools::ChangeDirectory(dir.c_str()); + cmSystemTools::ChangeDirectory(dir); return 1; } @@ -270,7 +270,7 @@ int cmCPackArchiveGenerator::PackageFiles() DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); std::vector<std::string>::const_iterator fileIt; std::string dir = cmSystemTools::GetCurrentWorkingDirectory(); - cmSystemTools::ChangeDirectory(toplevel.c_str()); + cmSystemTools::ChangeDirectory(toplevel); for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) { // Get the relative path to the file @@ -288,7 +288,7 @@ int cmCPackArchiveGenerator::PackageFiles() return 0; } } - cmSystemTools::ChangeDirectory(dir.c_str()); + cmSystemTools::ChangeDirectory(dir); // The destructor of cmArchiveWrite will close and finish the write return 1; } |