summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-11 23:11:59 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-11 23:11:59 (GMT)
commit080a79ca4a0448043e0713b9b580c5f84b7330b3 (patch)
tree26534caa5ee6e522456ccdebb8dc36744611e1f6 /Source/cmSystemTools.h
parent8a1d25afdf92cabab88598cc9b9e5a9fb2a9493b (diff)
downloadCMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.zip
CMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.tar.gz
CMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.tar.bz2
cmSystemTools: More methods accept `std::string` params
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 88758a6..ba6de51 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -144,16 +144,16 @@ public:
static bool IsPathToFramework(const char* value);
static bool DoesFileExistWithExtensions(
- const char* name, const std::vector<std::string>& sourceExts);
+ const std::string& name, const std::vector<std::string>& sourceExts);
/**
* Check if the given file exists in one of the parent directory of the
* given file or directory and if it does, return the name of the file.
* Toplevel specifies the top-most directory to where it will look.
*/
- static std::string FileExistsInParentDirectories(const char* fname,
- const char* directory,
- const char* toplevel);
+ static std::string FileExistsInParentDirectories(
+ const std::string& fname, const std::string& directory,
+ const std::string& toplevel);
static void Glob(const std::string& directory, const std::string& regexp,
std::vector<std::string>& files);
@@ -443,13 +443,15 @@ public:
/** Copy the file create/access/modify times from the file named by
the first argument to that named by the second. */
- static bool CopyFileTime(const char* fromFile, const char* toFile);
+ static bool CopyFileTime(const std::string& fromFile,
+ const std::string& toFile);
/** Save and restore file times. */
static cmSystemToolsFileTime* FileTimeNew();
static void FileTimeDelete(cmSystemToolsFileTime*);
- static bool FileTimeGet(const char* fname, cmSystemToolsFileTime* t);
- static bool FileTimeSet(const char* fname, cmSystemToolsFileTime* t);
+ static bool FileTimeGet(const std::string& fname, cmSystemToolsFileTime* t);
+ static bool FileTimeSet(const std::string& fname,
+ const cmSystemToolsFileTime* t);
/** Random seed generation. */
static unsigned int RandomSeed();