fixed size of buffer returned by wxFormatConverter (it was too large before)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -330,6 +330,17 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void shrink(size_t len)
|
||||
{
|
||||
wxASSERT_MSG( this->m_data->m_owned, "cannot shrink non-owned buffer" );
|
||||
wxASSERT_MSG( this->m_data->m_ref == 1, "can't shrink shared buffer" );
|
||||
|
||||
wxASSERT( len <= this->length() );
|
||||
|
||||
this->m_data->m_length = len;
|
||||
this->data()[len] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer<char> )
|
||||
|
Reference in New Issue
Block a user