Use wxStringBuffer[Length] instead of explicit calls to

wxString::get/UngetWriteBuffer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-07-21 09:41:26 +00:00
parent 11d395f9d7
commit de564874d6
14 changed files with 60 additions and 77 deletions

View File

@@ -157,8 +157,7 @@ wxString wxDataFormat::GetId() const
wxCHECK_MSG( !IsStandard(), s,
wxT("name of predefined format cannot be retrieved") );
int len = ::GetClipboardFormatName(m_format, s.GetWriteBuf(max), max);
s.UngetWriteBuf();
int len = ::GetClipboardFormatName(m_format, wxStringBuffer(s, max), max);
if ( !len )
{
@@ -999,8 +998,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *pData)
// +1 for terminating NUL
len = ::DragQueryFile(hdrop, n, NULL, 0) + 1;
UINT len2 = ::DragQueryFile(hdrop, n, str.GetWriteBuf(len), len);
str.UngetWriteBuf();
UINT len2 = ::DragQueryFile(hdrop, n, wxStringBuffer(str, len), len);
m_filenames.Add(str);
if ( len2 != len - 1 ) {
@@ -1171,8 +1169,7 @@ wxString wxURLDataObject::GetURL() const
size_t len = m_dataObjectLast->GetDataSize();
m_dataObjectLast->GetDataHere(url.GetWriteBuf(len));
url.UngetWriteBuf();
m_dataObjectLast->GetDataHere(wxStringBuffer(url, len));
return url;
}