X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17483066d2fb8c6381ec90265f2f3b2d4fb1f88a..6ba7c06eeeda47b88783025428ca0f290e3bf236:/include/wx/image.h diff --git a/include/wx/image.h b/include/wx/image.h index 7522d06854..6d025c286b 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -10,7 +10,7 @@ #ifndef _WX_IMAGE_H_ #define _WX_IMAGE_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "image.h" #endif @@ -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;