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:
Vadim Zeitlin
2008-07-19 19:59:59 +00:00
parent 9f10e7c758
commit cc209a518f
5 changed files with 61 additions and 12 deletions

View File

@@ -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