From c45ead7b4bd0697526a2eeaccfc6eb88029125ea Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Apr 2007 23:41:40 +0000 Subject: [PATCH] compilation fix for Unicode build: remove ambiguity arising when trying to pass wxCharBuffer to wxBasicString ctor which is overloaded for const char * and wxString by passing it directly wxString instead of calling mb_str() on it first git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/ole/oleutils.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 058f4afd87..ca0289188a 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -70,16 +70,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount) WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str) { -/* - unsigned int len = strlen((const char*) str); - unsigned short* s = new unsigned short[len*2+2]; - unsigned int i; - memset(s, 0, len*2+2); - for (i=0; i < len; i++) - s[i*2] = str[i]; -*/ - wxBasicString bstr(str.mb_str()); - return bstr.Get(); + return wxBasicString(str).Get(); } WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr) -- 2.50.0