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
This commit is contained in:
@@ -70,16 +70,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
|
|||||||
|
|
||||||
WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str)
|
WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str)
|
||||||
{
|
{
|
||||||
/*
|
return wxBasicString(str).Get();
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
|
WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
|
||||||
|
Reference in New Issue
Block a user