added wxStringOutputStream::TellO(); fixed bugs in OnSysWrite()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,15 @@ size_t wxStringInputStream::OnSysRead(void *buffer, size_t size)
|
||||
// wxStringOutputStream implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// seek/tell
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
off_t wxStringOutputStream::OnSysTell() const
|
||||
{
|
||||
return wx_static_cast(off_t, m_pos);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// actual IO
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -112,10 +121,13 @@ size_t wxStringOutputStream::OnSysWrite(const void *buffer, size_t size)
|
||||
|
||||
const wxChar *p = wx_static_cast(const wxChar *, buffer);
|
||||
|
||||
m_str->Append(wxString(p, p + len + 1));
|
||||
m_str->Append(wxString(p, p + len));
|
||||
|
||||
// return number of bytes actually written
|
||||
return len*sizeof(wxChar);
|
||||
len *= sizeof(wxChar);
|
||||
m_pos += len;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STREAMS
|
||||
|
Reference in New Issue
Block a user