diff options
author | Brad King <brad.king@kitware.com> | 2004-10-11 12:02:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-10-11 12:02:51 (GMT) |
commit | bc6ae0649b849b4c7df3977f449d84f6d319f66e (patch) | |
tree | 2f7f8c9a96855da9a634b3fe9b6884d35264df40 /Source/kwsys | |
parent | b221d046a6c1005f2110304c0ca36133e9e96cc4 (diff) | |
download | CMake-bc6ae0649b849b4c7df3977f449d84f6d319f66e.zip CMake-bc6ae0649b849b4c7df3977f449d84f6d319f66e.tar.gz CMake-bc6ae0649b849b4c7df3977f449d84f6d319f66e.tar.bz2 |
ERR: Replaced std::string with kwsys_stl::string for portability.
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 12 | ||||
-rw-r--r-- | Source/kwsys/SystemTools.hxx.in | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index c871f54..658f580 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2010,15 +2010,15 @@ bool SystemTools::SetPermissions(const char* file, mode_t mode) return true; } -std::string SystemTools::GetParentDirectory(const char* fileOrDir) +kwsys_stl::string SystemTools::GetParentDirectory(const char* fileOrDir) { if ( !fileOrDir || !*fileOrDir ) { return ""; } - std::string res = fileOrDir; + kwsys_stl::string res = fileOrDir; SystemTools::ConvertToUnixSlashes(res); - std::string::size_type cc = res.size()-1; + kwsys_stl::string::size_type cc = res.size()-1; if ( res[cc] == '/' ) { cc --; @@ -2035,10 +2035,10 @@ std::string SystemTools::GetParentDirectory(const char* fileOrDir) bool SystemTools::IsSubDirectory(const char* cSubdir, const char* cDir) { - std::string subdir = cSubdir; - std::string dir = cDir; + kwsys_stl::string subdir = cSubdir; + kwsys_stl::string dir = cDir; SystemTools::ConvertToUnixSlashes(dir); - std::string path = subdir; + kwsys_stl::string path = subdir; do { path = SystemTools::GetParentDirectory(path.c_str()); diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index 89e32a3..e951206 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -317,7 +317,7 @@ public: static bool SetPermissions(const char* file, mode_t mode); /** Get the parent directory of the directory or file */ - static std::string GetParentDirectory(const char* fileOrDir); + static kwsys_stl::string GetParentDirectory(const char* fileOrDir); /** Check if the given file or directory is in subdirectory of dir */ static bool IsSubDirectory(const char* fileOrDir, const char* dir); |