check that string passed to FromUTF8() is valid even in release build, this is safer; add a separate FromUTF8Unchecked() which can be used for maximal efficiency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,7 +44,7 @@ inline NSString* wxInitNSStringWithWxString(NSString *nsstring, const wxString &
|
||||
inline wxString wxStringWithNSString(NSString *nsstring)
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
return wxString::FromUTF8([nsstring UTF8String]);
|
||||
return wxString::FromUTF8Unchecked([nsstring UTF8String]);
|
||||
#else
|
||||
return wxString([nsstring lossyCString]);
|
||||
#endif // wxUSE_UNICODE
|
||||
|
Reference in New Issue
Block a user