X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef8f37e0dbfdd5b3eac3bce7ad13347c8ed450ef..5d644707ca96dcaa63dc5a24c9eb5c2b7ee0b50d:/include/wx/image.h diff --git a/include/wx/image.h b/include/wx/image.h index 7522d06854..7718cacdeb 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -43,7 +43,9 @@ class WXDLLEXPORT wxImage; class WXDLLEXPORT wxImageHandler: public wxObject { public: - wxImageHandler() { m_name = ""; m_extension = ""; m_type = 0; } + wxImageHandler() + : m_name(""), m_extension(""), m_mime(), m_type(0) + { } #if wxUSE_STREAMS virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); @@ -51,7 +53,7 @@ public: virtual int GetImageCount( wxInputStream& stream ); - bool CanRead( wxInputStream& stream ) { return DoCanRead(stream); } + bool CanRead( wxInputStream& stream ) { return CallDoCanRead(stream); } bool CanRead( const wxString& name ); #endif // wxUSE_STREAMS @@ -67,6 +69,9 @@ public: protected: #if wxUSE_STREAMS virtual bool DoCanRead( wxInputStream& stream ) = 0; + + // save the stream position, call DoCanRead() and restore the position + bool CallDoCanRead(wxInputStream& stream); #endif // wxUSE_STREAMS wxString m_name;