split wxCharTypeBuffer<T> into wxScopedCharTypeBuffer<T> and wxCharTypeBuffer<T> -- the former is for transient data with validity limited to parent's lifetime, the latter is for permanent storage of string data (bug #9638)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-03-27 15:33:55 +00:00
parent 36adcfc913
commit de4983f323
16 changed files with 635 additions and 348 deletions

View File

@@ -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();
@@ -491,7 +491,7 @@ wxCharBuffer wxUString::utf8_str() const
return result;
}
wxU16CharBuffer wxUString::utf16_str() const
wxScopedU16CharBuffer wxUString::utf16_str() const
{
size_type utf16_length = 0;
const wxChar32 *ptr = data();