diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/System/Unix/Path.inc | 6 | ||||
-rw-r--r-- | lib/System/Win32/Path.inc | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 73ccbfb..cdb574f 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -81,6 +81,12 @@ Path::Path(const std::string& p) Path::Path(const char *StrStart, unsigned StrLen) : path(StrStart, StrLen) {} +Path& +Path::operator=(const std::string &that) { + path = that; + return *this; +} + bool Path::isValid() const { // Check some obvious things diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index bb1252c..ff96e33 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -56,6 +56,13 @@ Path::Path(const char *StrStart, unsigned StrLen) FlipBackSlashes(path); } +Path& +Path::operator=(const std::string &that) { + path = that; + FlipBackSlashes(path); + return *this; +} + bool Path::isValid() const { if (path.empty()) |