summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/EncodingCXX.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-30 13:17:30 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-30 13:17:30 (GMT)
commit5ddcaae77c531fc2e696204799505fbccb18b10d (patch)
tree4b275f81bb2e619d309390d0e535abd540f4ffb9 /Source/kwsys/EncodingCXX.cxx
parent5b64788c51f7676276c0d8685003fd002b27388b (diff)
parentfe6725a1f7c055b920508e7179fbc21a38cd37d3 (diff)
downloadCMake-5ddcaae77c531fc2e696204799505fbccb18b10d.zip
CMake-5ddcaae77c531fc2e696204799505fbccb18b10d.tar.gz
CMake-5ddcaae77c531fc2e696204799505fbccb18b10d.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2019-10-30 (43131a7c)
Diffstat (limited to 'Source/kwsys/EncodingCXX.cxx')
-rw-r--r--Source/kwsys/EncodingCXX.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/kwsys/EncodingCXX.cxx b/Source/kwsys/EncodingCXX.cxx
index 4593c92..5cad934 100644
--- a/Source/kwsys/EncodingCXX.cxx
+++ b/Source/kwsys/EncodingCXX.cxx
@@ -221,8 +221,18 @@ std::string Encoding::ToNarrow(const wchar_t* wcstr)
// Convert local paths to UNC style paths
std::wstring Encoding::ToWindowsExtendedPath(std::string const& source)
{
- std::wstring wsource = Encoding::ToWide(source);
+ return ToWindowsExtendedPath(ToWide(source));
+}
+// Convert local paths to UNC style paths
+std::wstring Encoding::ToWindowsExtendedPath(const char* source)
+{
+ return ToWindowsExtendedPath(ToWide(source));
+}
+
+// Convert local paths to UNC style paths
+std::wstring Encoding::ToWindowsExtendedPath(std::wstring const& wsource)
+{
// Resolve any relative paths
DWORD wfull_len;
@@ -269,7 +279,7 @@ std::wstring Encoding::ToWindowsExtendedPath(std::string const& source)
// If this case has been reached, then the path is invalid. Leave it
// unchanged
- return Encoding::ToWide(source);
+ return wsource;
}
# endif