Compilation fix for wxUSE_UNICODE_WCHAR && !wxUSE_STL_BASED_WXSTRING.
Construct wxScopedWCharBuffer using CreateNonOwned() in wxString::ToStdWstring() in this case, creating it directly from wc_str() doesn't work (intentionally, as this doesn't tell if the buffer owns the string or not). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1383,7 +1383,13 @@ public:
|
||||
#define wxStringToStdWstringRetType wxStdWideString
|
||||
wxStdWideString ToStdWstring() const
|
||||
{
|
||||
#if wxUSE_UNICODE_WCHAR
|
||||
wxScopedWCharBuffer buf =
|
||||
wxScopedWCharBuffer::CreateNonOwned(m_impl.c_str(), m_impl.length());
|
||||
#else // !wxUSE_UNICODE_WCHAR
|
||||
wxScopedWCharBuffer buf(wc_str());
|
||||
#endif
|
||||
|
||||
return wxStdWideString(buf.data(), buf.length());
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user