diff options
author | Oliver Schneider <oliver@assarbad.net> | 2017-11-20 23:43:25 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2017-11-20 23:43:25 +0300 |
commit | 916f7162919565c9dfce0fc8e90f8cb7ab283c6d (patch) | |
tree | a15d19383da005136d8f0cef9ab67e70875f8f91 /common | |
parent | c7f9ce9698fd0ff23da40b5d823616d918f0ad63 (diff) |
Minor cleanup
And another fix to premake4.lua and subsequently the one affected project
Diffstat (limited to 'common')
-rw-r--r-- | common/commonhelpers.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/common/commonhelpers.cpp b/common/commonhelpers.cpp index 6d5750a..48f94b5 100644 --- a/common/commonhelpers.cpp +++ b/common/commonhelpers.cpp @@ -23,29 +23,23 @@ CString MyStrRetToString(const LPITEMIDLIST pidl, const STRRET *strret) { - // TODO: replace with shallow wrapper around StrRetToStr - - // StrRetToStr() is not always available (e.g. on Windows 98). - // So we use an own function instead. - USES_CONVERSION; - CString s; switch (strret->uType) { case STRRET_CSTR: { - s = strret->cStr; - } + s.Format(_T("%hs"), strret->cStr); + } break; case STRRET_OFFSET: { - s = A2T((char *)pidl + strret->uOffset); + s.Format(_T("%hs"), (char *)pidl + strret->uOffset); } break; case STRRET_WSTR: { - s = W2T(strret->pOleStr); + s = strret->pOleStr; } break; } |