]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagiff.cpp
VC 7.1 warning fix
[wxWidgets.git] / src / common / imagiff.cpp
index 25d700bc377dadfc3e7968959fb1741a9815975a..432982552a2fc4c170ba386e07f73aab0f7697dd 100644 (file)
 #include "wx/log.h"
 #include "wx/intl.h"
 
+#if wxUSE_PALETTE
+    #include "wx/palette.h"
+#endif // wxUSE_PALETTE
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -235,7 +239,7 @@ bool wxIFFDecoder::CanRead()
     if ( !m_f->Read(buf, WXSIZEOF(buf)) )
         return FALSE;
 
-    m_f->SeekI(-WXSIZEOF(buf), wxFromCurrent);
+    m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
 
     return (memcmp(buf, "FORM", 4) == 0) && (memcmp(buf+8, "ILBM", 4) == 0);
 }
@@ -785,14 +789,9 @@ bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image),
 
 bool wxIFFHandler::DoCanRead(wxInputStream& stream)
 {
-    wxIFFDecoder *decod;
-    bool ok;
+    wxIFFDecoder decod(&stream);
 
-    decod = new wxIFFDecoder(&stream);
-    ok = decod->CanRead();
-    delete decod;
-
-    return ok;
+    return decod.CanRead();
 }
 
 #endif // wxUSE_STREAMS