]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/animateg.cpp
no real change; just add the standard separator where it's missing
[wxWidgets.git] / src / generic / animateg.cpp
index 17605f1af85d68d8e04118313ac94c87dcdf6515..fe6ee204da04cf05e501fae14d60e3ce07b5ce4a 100644 (file)
@@ -42,7 +42,7 @@ wxAnimationDecoderList wxAnimation::sm_handlers;
 // ----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxAnimationBase)
-#define M_ANIMDATA      wx_static_cast(wxAnimationDecoder*, m_refData)
+#define M_ANIMDATA      static_cast<wxAnimationDecoder*>(m_refData)
 
 wxSize wxAnimation::GetSize() const
 {
@@ -138,7 +138,6 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
                 m_refData = handler->Clone();
                 return M_ANIMDATA->Load(stream);
             }
-
         }
 
         wxLogWarning( _("No handler found for animation type.") );
@@ -307,10 +306,17 @@ wxAnimationCtrl::~wxAnimationCtrl()
 }
 
 bool wxAnimationCtrl::LoadFile(const wxString& filename, wxAnimationType type)
+{
+    wxFileInputStream fis(filename);
+    if (!fis.Ok())
+        return false;
+    return Load(fis, type);
+}
+
+bool wxAnimationCtrl::Load(wxInputStream& stream, wxAnimationType type)
 {
     wxAnimation anim;
-    if (!anim.LoadFile(filename, type) ||
-        !anim.IsOk())
+    if ( !anim.Load(stream, type) || !anim.IsOk() )
         return false;
 
     SetAnimation(anim);