gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp
Date: Tue, 19 Sep 2006 12:38:59 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/19 12:38:59

Modified files:
        .              : ChangeLog 
        server         : sprite_instance.cpp 

Log message:
                * server/sprite_instance.cpp (call_frame_actions): fixed
                  premature deletion of action buffers (also optimized somehow).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.867&r2=1.868
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.47&r2=1.48

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.867
retrieving revision 1.868
diff -u -b -r1.867 -r1.868
--- ChangeLog   19 Sep 2006 10:43:27 -0000      1.867
+++ ChangeLog   19 Sep 2006 12:38:59 -0000      1.868
@@ -1,5 +1,7 @@
 2006-09-19 Sandro Santilli  <address@hidden>
 
+       * server/sprite_instance.cpp (call_frame_actions): fixed
+         premature deletion of action buffers (also optimized somehow).
        * testsuite/actionscript.all/Makefile.am,
          testsuite/actionscript.all/gen-index.sh: generate
          a page with all testcases for each SWF target.

Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- server/sprite_instance.cpp  28 Aug 2006 21:26:26 -0000      1.47
+++ server/sprite_instance.cpp  19 Sep 2006 12:38:59 -0000      1.48
@@ -770,12 +770,12 @@
                    return;
        }
 
-       unsigned int top_action = m_action_list.size();
+       size_t top_action = m_action_list.size();
 
        // Execute the execute_tag actions
 
        const std::vector<execute_tag*>&playlist = 
m_def->get_playlist(frame_number);
-       for (int i=0, n=playlist.size(); i<n; ++i)
+       for (size_t i=0, n=playlist.size(); i<n; ++i)
        {
                execute_tag*    e = playlist[i];
                if (e->is_action_tag())
@@ -787,12 +787,14 @@
        // Execute any new actions triggered by the tag,
        // leaving existing actions to be executed.
 
-       while (m_action_list.size() > top_action)
+       size_t idx = top_action;
+       while (m_action_list.size() > idx)
        {
-               m_action_list[top_action]->execute(&m_as_environment);
-               //m_action_list.remove(top_action);
-               m_action_list.erase(m_action_list.begin()+top_action);
+               m_action_list[idx]->execute(&m_as_environment);
+               ++idx;
        }
+       m_action_list.erase(m_action_list.begin()+top_action,
+               m_action_list.end());
 
        assert(m_action_list.size() == top_action);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]