gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11709: Change container for movie_r


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11709: Change container for movie_root's action queue on the principle of least
Date: Thu, 17 Dec 2009 08:23:53 +0100
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 11709 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-12-17 08:23:53 +0100
message:
  Change container for movie_root's action queue on the principle of least
  complexity.
modified:
  libcore/movie_root.cpp
  libcore/movie_root.h
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp    2009-11-24 21:01:56 +0000
+++ b/libcore/movie_root.cpp    2009-12-16 07:11:25 +0000
@@ -1405,7 +1405,7 @@
 {
        for (int l=0; l<apSIZE; ++l)
        {
-               if ( ! _actionQueue[l].empty() ) return l;
+               if (!_actionQueue[l].empty()) return l;
        }
        return apSIZE;
 }

=== modified file 'libcore/movie_root.h'
--- a/libcore/movie_root.h      2009-11-19 07:43:34 +0000
+++ b/libcore/movie_root.h      2009-12-16 07:11:25 +0000
@@ -97,6 +97,7 @@
 #endif
 
 #include <vector>
+#include <deque>
 #include <list>
 #include <set>
 #include <bitset>
@@ -1063,8 +1064,13 @@
     /// The list of advanceable DisplayObject, in placement order
     LiveChars _liveChars;
 
-    typedef std::list<ExecutableCode*> ActionQueue;
 
+    /// A number of queues of code to execute
+    //
+    /// This is a deque because it needs no insertion in the middle but
+    /// frequent push_back and pop_front. We also have to traverse it, so
+    /// a std::queue is not usable.
+    typedef std::deque<ExecutableCode*> ActionQueue;
     ActionQueue _actionQueue[apSIZE];
 
     /// Process all actions in the queue


reply via email to

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