diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-29 15:34:18 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-29 15:34:18 (GMT) |
commit | c31b6e616d5c2d697696540ca2e8faf14160d2b0 (patch) | |
tree | bf4f82b41e5fd8a2d5f5fd76e80eb6f8e24e0e1b /Source/cmcmd.cxx | |
parent | 9620cb935a49e7b4955f5b1d0ffa2e93b4327591 (diff) | |
download | CMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.zip CMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.tar.gz CMake-c31b6e616d5c2d697696540ca2e8faf14160d2b0.tar.bz2 |
cmSystemTools: copy file member functions accept std::string params
Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 2a3aedd..d20c5d2 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -482,8 +482,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) // If error occurs we want to continue copying next files. bool return_value = false; for (std::string::size_type cc = 2; cc < args.size() - 1; cc++) { - if (!cmSystemTools::cmCopyFile(args[cc].c_str(), - args.back().c_str())) { + if (!cmSystemTools::cmCopyFile(args[cc], args.back())) { std::cerr << "Error copying file \"" << args[cc] << "\" to \"" << args.back() << "\".\n"; return_value = true; @@ -505,8 +504,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) // If error occurs we want to continue copying next files. bool return_value = false; for (std::string::size_type cc = 2; cc < args.size() - 1; cc++) { - if (!cmSystemTools::CopyFileIfDifferent(args[cc].c_str(), - args.back().c_str())) { + if (!cmSystemTools::CopyFileIfDifferent(args[cc], args.back())) { std::cerr << "Error copying file (if different) from \"" << args[cc] << "\" to \"" << args.back() << "\".\n"; return_value = true; @@ -1304,7 +1302,7 @@ bool cmcmd::SymlinkInternal(std::string const& file, std::string const& link) cmSystemTools::RemoveFile(link); } #if defined(_WIN32) && !defined(__CYGWIN__) - return cmSystemTools::CopyFileAlways(file.c_str(), link.c_str()); + return cmSystemTools::CopyFileAlways(file, link); #else std::string linktext = cmSystemTools::GetFilenameName(file); return cmSystemTools::CreateSymlink(linktext, link); |