aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-24 20:55:35 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-24 20:55:35 -0800
commit3bf88110aa9a39f530680b4f72bca29be0637e5b (patch)
tree9a2386a583a2948d55a27ee3c46552839b6aa2ab /wutil.cpp
parentcc5c4110396cc92eef0161b398d5658cd86d682a (diff)
Removal of more lingering wcs2str()
Diffstat (limited to 'wutil.cpp')
-rw-r--r--wutil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/wutil.cpp b/wutil.cpp
index 978b7e0a..8d9b2f4d 100644
--- a/wutil.cpp
+++ b/wutil.cpp
@@ -330,16 +330,16 @@ wchar_t *wrealpath(const wcstring &pathname, wchar_t *resolved_path)
if (!narrow_res)
return 0;
-
+
+ const wcstring wide_res = str2wcstring(narrow_res);
if (resolved_path)
{
- wcstring tmp2 = str2wcstring(narrow_res);
- wcslcpy(resolved_path, tmp2.c_str(), PATH_MAX);
+ wcslcpy(resolved_path, wide_res.c_str(), PATH_MAX);
res = resolved_path;
}
else
{
- res = wcsdup(str2wcstring(narrow_res).c_str());
+ res = wcsdup(wide_res.c_str());
}
return res;
}