X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e28985499b2e69531fdf6b562fdb143ec6441b8c..e6a8416274252fb6ea33800cfce0e4ba0a0542f1:/src/msw/ole/oleutils.cpp diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 6c9e409042..ca0289188a 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -21,13 +21,15 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif -#include "wx/log.h" - #if wxUSE_OLE +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + #ifndef __CYGWIN10__ #include "wx/msw/private.h" @@ -68,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)