X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d84afea9d1ec41ee4e2ebb3bf6b87926cf5f04d1..df7145da50005a9f512d8f3329b6ed2166e956d0:/include/wx/image.h diff --git a/include/wx/image.h b/include/wx/image.h index 6df67faa3c..7718cacdeb 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -53,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 @@ -69,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;