X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c69ef61f3ad09c0aef39915d4361a534f598520..2747a51b243ef5d44cec5b4e3757d56af56352a2:/src/common/ustring.cpp diff --git a/src/common/ustring.cpp b/src/common/ustring.cpp index 1c23bf0da7..1da0c9256a 100644 --- a/src/common/ustring.cpp +++ b/src/common/ustring.cpp @@ -3,7 +3,7 @@ // Purpose: wxUString class // Author: Robert Roebling // Created: 2008-07-25 -// RCS-ID: $Id:$ +// RCS-ID: $Id$ // Copyright: (c) 2008 Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -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();