]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gifdecod.cpp
Fix wxDocManager::GetLastDirectory() when there is no history.
[wxWidgets.git] / src / common / gifdecod.cpp
index 3701ea569a2e6a447961609c5449502c91dca815..27669b8d2a7b8271cccd565ff580b78da92d469e 100644 (file)
@@ -19,6 +19,8 @@
 
 #ifndef WX_PRECOMP
     #include "wx/palette.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
 #endif
 
 #include <stdlib.h>
@@ -573,16 +575,13 @@ as an End of Information itself)
 // CanRead:
 //  Returns true if the file looks like a valid GIF, false otherwise.
 //
-bool wxGIFDecoder::CanRead(wxInputStream &stream) const
+bool wxGIFDecoder::DoCanRead(wxInputStream &stream) const
 {
     unsigned char buf[3];
 
     if ( !stream.Read(buf, WXSIZEOF(buf)) )
         return false;
 
-    if (stream.SeekI(-(wxFileOffset)WXSIZEOF(buf), wxFromCurrent) == wxInvalidOffset)
-        return false;       // this happens e.g. for non-seekable streams
-
     return memcmp(buf, "GIF", WXSIZEOF(buf)) == 0;
 }