X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2cce66352fc23859e991c2e7658dbf1cdf8c4183..7198c3368055d88249a338eb33b21f051f674806:/src/common/ustring.cpp diff --git a/src/common/ustring.cpp b/src/common/ustring.cpp index 9a6897122a..1da0c9256a 100644 --- a/src/common/ustring.cpp +++ b/src/common/ustring.cpp @@ -399,7 +399,7 @@ wxUString &wxUString::assignFromCString( const char* str ) if (!str) return assign( wxUString() ); - wxWCharBuffer buffer = wxConvLibc.cMB2WC( str ); + wxScopedWCharBuffer buffer = wxConvLibc.cMB2WC( str ); return assign( buffer ); } @@ -409,12 +409,12 @@ wxUString &wxUString::assignFromCString( const char* str, const wxMBConv &conv ) if (!str) return assign( wxUString() ); - wxWCharBuffer buffer = conv.cMB2WC( str ); + wxScopedWCharBuffer buffer = conv.cMB2WC( str ); return assign( buffer ); } -wxCharBuffer wxUString::utf8_str() const +wxScopedCharBuffer wxUString::utf8_str() const { size_type utf8_length = 0; const wxChar32 *ptr = data(); @@ -488,13 +488,10 @@ wxCharBuffer wxUString::utf8_str() const } } - wxPrintf( "utf8_str %s len %d\n", result, wxStrlen( result.data() ) ); - wxPrintf( "utf8_str %s len %d\n", result, wxStrlen( result.data() ) ); - return result; } -wxU16CharBuffer wxUString::utf16_str() const +wxScopedU16CharBuffer wxUString::utf16_str() const { size_type utf16_length = 0; const wxChar32 *ptr = data();