summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-23 01:37:59 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-01-23 01:37:59 (GMT)
commit9e5c13738bdc45b00b529b492bad92800890fb9c (patch)
treeee07703b2cf6a7178c7f76f934f828afe2b3764e /Source/cmSystemTools.cxx
parentfa5bf870df1ce5d9cbcf61be736beb0b1e87b85b (diff)
downloadCMake-9e5c13738bdc45b00b529b492bad92800890fb9c.zip
CMake-9e5c13738bdc45b00b529b492bad92800890fb9c.tar.gz
CMake-9e5c13738bdc45b00b529b492bad92800890fb9c.tar.bz2
cmSystemTools::RenameFile: Accepts std::string args
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 9abc5f3..7126944 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1028,7 +1028,8 @@ void cmSystemTools::InitializeLibUV()
#endif
}
-bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
+bool cmSystemTools::RenameFile(const std::string& oldname,
+ const std::string& newname)
{
#ifdef _WIN32
# ifndef INVALID_FILE_ATTRIBUTES
@@ -1066,7 +1067,7 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
return retry.Count > 0;
#else
/* On UNIX we have an OS-provided call to do this atomically. */
- return rename(oldname, newname) == 0;
+ return rename(oldname.c_str(), newname.c_str()) == 0;
#endif
}