diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2019-09-18 12:13:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-18 13:26:35 (GMT) |
commit | 3327c0402a1ce31615c7ad22c5ff5d5330fb75da (patch) | |
tree | fb4faa49f9546d9c9b97b12807994b5c3bcb328d /SystemTools.hxx.in | |
parent | f9a3f13415bb6d6f1750cfe5a45ce4aa9e329907 (diff) | |
download | CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.zip CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.tar.gz CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.tar.bz2 |
KWSys 2019-09-18 (c6bc38c1)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit c6bc38c11a3a11e393f0608486b08dadc8dbacc3 (master).
Upstream Shortlog
-----------------
Sean McBride (5):
4de1241f Fixed -Wextra-semi-stmt warning
30de8e17 Fixed -Wsign-conversion warnings by adding casts
750da75a Fixed 64 to 32 bit truncation warning by casting
419aaa35 Fixed -Wunused-macros warnings
46c55893 Replaced several 0, NULL, and KWSYS_NULLPTR with nullptr
Diffstat (limited to 'SystemTools.hxx.in')
-rw-r--r-- | SystemTools.hxx.in | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index dd1266b..c4ab9d4 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -400,9 +400,10 @@ public: * installPrefix is a possibly null pointer to the install directory. */ static bool FindProgramPath(const char* argv0, std::string& pathOut, - std::string& errorMsg, const char* exeName = 0, - const char* buildDir = 0, - const char* installPrefix = 0); + std::string& errorMsg, + const char* exeName = nullptr, + const char* buildDir = nullptr, + const char* installPrefix = nullptr); /** * Given a path to a file or directory, convert it to a full path. @@ -420,11 +421,11 @@ public: * Get the real path for a given path, removing all symlinks. In * the event of an error (non-existent path, permissions issue, * etc.) the original path is returned if errorMessage pointer is - * NULL. Otherwise empty string is returned and errorMessage + * nullptr. Otherwise empty string is returned and errorMessage * contains error description. */ static std::string GetRealPath(const std::string& path, - std::string* errorMessage = 0); + std::string* errorMessage = nullptr); /** * Split a path name into its root component and the rest of the @@ -442,7 +443,7 @@ public: * given. */ static const char* SplitPathRootComponent(const std::string& p, - std::string* root = 0); + std::string* root = nullptr); /** * Split a path name into its basic components. The first component @@ -528,7 +529,8 @@ public: * be true when the line read had a newline character. */ static bool GetLineFromStream(std::istream& istr, std::string& line, - bool* has_newline = 0, long sizeLimit = -1); + bool* has_newline = nullptr, + long sizeLimit = -1); /** * Get the parent directory of the directory or file @@ -563,8 +565,9 @@ public: * can make a full path even if none of the directories existed * prior to calling this function. */ - static bool MakeDirectory(const char* path, const mode_t* mode = 0); - static bool MakeDirectory(const std::string& path, const mode_t* mode = 0); + static bool MakeDirectory(const char* path, const mode_t* mode = nullptr); + static bool MakeDirectory(const std::string& path, + const mode_t* mode = nullptr); /** * Copy the source file to the destination file only @@ -842,7 +845,8 @@ public: * string vector passed in. If env is set then the value * of env will be used instead of PATH. */ - static void GetPath(std::vector<std::string>& path, const char* env = 0); + static void GetPath(std::vector<std::string>& path, + const char* env = nullptr); /** * Read an environment variable |