X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4ada568223b79c8a5769cc351c36a8e2ccd7841..4c7e33c5ea8f4e68a1468333e26251d0271613b0:/src/common/stream.cpp?ds=sidebyside diff --git a/src/common/stream.cpp b/src/common/stream.cpp index d546ab473f..3c038e14d9 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -348,7 +348,7 @@ wxInputStream& wxInputStream::operator>>(float& f) } if (c == '.') { - float f_multiplicator = 0.1; + float f_multiplicator = (float) 0.1; c = GetC(); while (isdigit(c)) { @@ -363,12 +363,14 @@ wxInputStream& wxInputStream::operator>>(float& f) return *this; } +#if wxUSE_SERIAL wxInputStream& wxInputStream::operator>>(wxObject *& obj) { wxObjectInputStream obj_s(*this); obj = obj_s.LoadObject(); return *this; } +#endif off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode) { @@ -542,12 +544,14 @@ wxOutputStream& wxOutputStream::operator<<(double f) return Write(strfloat, strfloat.Len()); } +#if wxUSE_SERIAL wxOutputStream& wxOutputStream::operator<<(wxObject& obj) { wxObjectOutputStream obj_s(*this); obj_s.SaveObject(obj); return *this; } +#endif // ---------------------------------------------------------------------------- // wxStream @@ -570,6 +574,8 @@ wxFilterInputStream::wxFilterInputStream(wxInputStream& stream) : wxInputStream(NULL) { m_parent_i_stream = &stream; + wxDELETE(m_i_streambuf); // In case m_i_streambuf has been initialized. + m_i_destroybuf = FALSE; m_i_streambuf = stream.InputStreamBuffer(); } @@ -604,6 +610,8 @@ wxFilterOutputStream::wxFilterOutputStream(wxOutputStream& stream) : wxOutputStream(NULL) { m_parent_o_stream = &stream; + wxDELETE(m_o_streambuf); // In case m_o_streambuf has been initialized. + m_o_destroybuf = FALSE; m_o_streambuf = stream.OutputStreamBuffer(); }