gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ./ChangeLog libbase/container.h libbase/g...


From: Jim Garrison
Subject: [Gnash-commit] gnash ./ChangeLog libbase/container.h libbase/g...
Date: Sun, 12 Feb 2006 02:12:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         
Changes by:     Jim Garrison <address@hidden>   06/02/12 02:12:07

Modified files:
        .              : ChangeLog 
        libbase        : container.h grid_index.h triangulate_impl.h 
        server         : Movie.cpp MovieClipLoader.cpp Sprite.h 
                         action.cpp dlist.cpp font.cpp fontlib.cpp 
                         impl.cpp shape.cpp tesselate.cpp textformat.cpp 
                         timers.cpp xml.cpp xmlsocket.h 

Log message:
        2006-02-11  Jim Garrison  <address@hidden>
        
        * libbase/container.h: changed array to derive from std::vector
        instead of being custom implemented, renamed hash::is_empty()
        to hash::empty()
        * libbase/grid_index.h: changed to std::vector API
        * libbase/triangulate_impl.h: changed to std::vector API
        * server/Movie.cpp: changed to std::vector API
        * server/MovieClipLoader.cpp: create explicit empty array instead
        of passing the value 0
        * server/Sprite.h: set each element of std::vector<bool> to
        false instead of using memset
        * server/action.cpp: changed to std::vector API
        * server/dlist.cpp: changed to std::vector API
        * server/font.cpp: changed hash::is_empty() to hash::empty()
        * server/fontlib.cpp: changed to std::vector API
        * server/impl.cpp: changed to std::vector API
        * server/shape.cpp: changed to std::vector API, typecast
        std:vector::size() to an integer to fix an assertion
        * server/tesselate.cpp: changed to std::vector API
        * server/textformat.cpp: create explicit empty array instead
        of passing the value 0
        * server/timers.cpp: create explicit empty array instead
        of passing the value 0
        * server/xml.cpp: create explicit empty array instead
        of passing the value 0
        * server/xmlsocket.h: changed to std::vector API

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.126&tr2=1.127&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/container.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/grid_index.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_impl.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/MovieClipLoader.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Sprite.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/dlist.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/font.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/fontlib.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/tesselate.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/textformat.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/timers.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlsocket.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.126 gnash/ChangeLog:1.127
--- gnash/ChangeLog:1.126       Sat Feb 11 18:09:43 2006
+++ gnash/ChangeLog     Sun Feb 12 02:12:07 2006
@@ -1,3 +1,31 @@
+2006-02-11  Jim Garrison  <address@hidden>
+
+       * libbase/container.h: changed array to derive from std::vector
+       instead of being custom implemented, renamed hash::is_empty()
+       to hash::empty()
+       * libbase/grid_index.h: changed to std::vector API
+       * libbase/triangulate_impl.h: changed to std::vector API
+       * server/Movie.cpp: changed to std::vector API
+       * server/MovieClipLoader.cpp: create explicit empty array instead
+       of passing the value 0
+       * server/Sprite.h: set each element of std::vector<bool> to
+       false instead of using memset
+       * server/action.cpp: changed to std::vector API
+       * server/dlist.cpp: changed to std::vector API
+       * server/font.cpp: changed hash::is_empty() to hash::empty()
+       * server/fontlib.cpp: changed to std::vector API
+       * server/impl.cpp: changed to std::vector API
+       * server/shape.cpp: changed to std::vector API, typecast
+       std:vector::size() to an integer to fix an assertion
+       * server/tesselate.cpp: changed to std::vector API
+       * server/textformat.cpp: create explicit empty array instead
+       of passing the value 0
+       * server/timers.cpp: create explicit empty array instead
+       of passing the value 0
+       * server/xml.cpp: create explicit empty array instead
+       of passing the value 0
+       * server/xmlsocket.h: changed to std::vector API
+
 2006-02-11  Rob Savoye  <address@hidden>
 
        * server/xmlnode.{h,cpp): Implement nodeType property.
Index: gnash/libbase/container.h
diff -u gnash/libbase/container.h:1.4 gnash/libbase/container.h:1.5
--- gnash/libbase/container.h:1.4       Tue Feb  7 03:10:36 2006
+++ gnash/libbase/container.h   Sun Feb 12 02:12:07 2006
@@ -76,40 +76,6 @@
 // array<> is much like std::vector<>
 //
 // @@ move this towards a strict subset of std::vector ?  Compatibility is 
good.
-template<class T> class array : public std::vector<T>
-{
-public:
-       int     size() const { return (int) std::vector<T>::size(); }
-
-       void    append(const array<T>& other)
-       // Append the given data to our array.
-       {
-               std::vector<T>::insert(end(), other.begin(), other.end());
-       }
-
-       void    append(const T other[], int count)
-       {
-               // This will probably work.  Depends on 
std::vector<T>::iterator being typedef'd as T*
-               std::vector<T>::insert(end(), &other[0], &other[count]);
-       }
-
-       void    remove(int index)
-       {
-               std::vector<T>::erase(begin() + index);
-       }
-
-       void    insert(int index, const T& val = T())
-       {
-               std::vector<T>::insert(begin() + index, val);
-       }
-
-       void    release()
-       {
-               // Drop all storage.
-               std::vector<T>  temp;
-               this->swap(temp);
-       }
-};
 
 
 // hash<> is similar to std::hash_map<>
@@ -132,8 +98,6 @@
                (*this)[key] = value;
        }
 
-       bool    is_empty() const { return empty(); }
-
        bool    get(const T& key, U* value) const
        // Retrieve the value under the given key.
        //
@@ -193,219 +157,12 @@
 
 
 
-template<class T>
-class array {
-// Resizable array.  Don't put anything in here that can't be moved
-// around by bitwise copy.  Don't keep the address of an element; the
-// array contents will move around as it gets resized.
-//
-// Default constructor and destructor get called on the elements as
-// they are added or removed from the active part of the array.
-public:
-       array() : m_buffer(0), m_size(0), m_buffer_size(0) {}
-       array(int size_hint) : m_buffer(0), m_size(0), m_buffer_size(0) { 
resize(size_hint); }
-       array(const array<T>& a)
-               :
-               m_buffer(0),
-               m_size(0),
-               m_buffer_size(0)
-       {
-               operator=(a);
-       }
-       ~array() {
-               clear();
-       }
-
-       // Basic array access.
-       T&      operator[](int index) { assert(index >= 0 && index < m_size); 
return m_buffer[index]; }
-       const T&        operator[](int index) const { assert(index >= 0 && 
index < m_size); return m_buffer[index]; }
-       int     size() const { return m_size; }
-
-       void    push_back(const T& val)
-       // Insert the given element at the end of the array.
-       {
-               // DO NOT pass elements of your own vector into
-               // push_back()!  Since we're using references,
-               // resize() may munge the element storage!
-               assert(&val < &m_buffer[0] || &val > &m_buffer[m_buffer_size]);
-
-               int     new_size = m_size + 1;
-               resize(new_size);
-               (*this)[new_size-1] = val;
-       }
-
-       void    pop_back()
-       // Remove the last element.
-       {
-               assert(m_size > 0);
-               resize(m_size - 1);
-       }
-
-       // Access the first element.
-       T&      front() { return (*this)[0]; }
-       const T&        front() const { return (*this)[0]; }
-
-       // Access the last element.
-       T&      back() { return (*this)[m_size-1]; }
-       const T&        back() const { return (*this)[m_size-1]; }
-
-       void    clear()
-       // Empty and destruct all elements.
-       {
-               resize(0);
-       }
-
-       void    release() { clear(); }
-
-       void    operator=(const array<T>& a)
-       // Array copy.  Copies the contents of a into this array.
-       {
-               resize(a.size());
-               for (int i = 0; i < m_size; i++) {
-                       *(m_buffer + i) = a[i];
-               }
-       }
-
-
-       void    remove(int index)
-       // Removing an element from the array is an expensive operation!
-       // It compacts only after removing the last element.
-       {
-               assert(index >= 0 && index < m_size);
-
-               if (m_size == 1)
-               {
-                       clear();
-               }
-               else
-               {
-                       m_buffer[index].~T();   // destructor
-
-                       memmove(m_buffer+index, m_buffer+index+1, sizeof(T) * 
(m_size - 1 - index));
-                       m_size--;
-               }
-       }
-
-
-       void    insert(int index, const T& val = T())
-       // Insert the given object at the given index shifting all the elements 
up.
-       {
-               assert(index >= 0 && index <= m_size);
-
-               resize(m_size + 1);
-
-               if (index < m_size - 1)
-               {
-                       // is it safe to use memmove?
-                       memmove(m_buffer+index+1, m_buffer+index, sizeof(T) * 
(m_size - 1 - index));
-               }
-
-               // Copy-construct into the newly opened slot.
-               new (m_buffer + index) T(val);
-       }
-
-
-       void    append(const array<T>& other)
-       // Append the given data to our array.
-       {
-               append(other.m_buffer, other.size());
-       }
-
-
-       void    append(const T other[], int count)
-       // Append the given data to our array.
-       {
-               if (count > 0)
-               {
-                       int     size0 = m_size;
-                       resize(m_size + count);
-                       // Must use operator=() to copy elements, in case of 
side effects (e.g. ref-counting).
-                       for (int i = 0; i < count; i++)
-                       {
-                               m_buffer[i + size0] = other[i];
-                       }
-               }
-       }
-
-
-       void    resize(int new_size)
-       // Preserve existing elements via realloc.
-       // 
-       // Newly created elements are initialized with default element
-       // of T.  Removed elements are destructed.
-       {
-               assert(new_size >= 0);
-
-               int     old_size = m_size;
-               m_size = new_size;
-
-               // Destruct old elements (if we're shrinking).
-               {for (int i = new_size; i < old_size; i++) {
-                       (m_buffer + i)->~T();
-               }}
-
-               if (new_size == 0) {
-                       m_buffer_size = 0;
-                       reserve(m_buffer_size);
-               } else if (m_size <= m_buffer_size && m_size > m_buffer_size >> 
1) {
-                       // don't compact yet.
-                       assert(m_buffer != 0);
-               } else {
-                       int     new_buffer_size = m_size + (m_size >> 2);
-                       reserve(new_buffer_size);
-               }
-
-               // Copy default T into new elements.
-               {for (int i = old_size; i < new_size; i++) {
-                       new (m_buffer + i) T(); // placement new
-               }}
-       }
+#include <vector>
 
-       void    reserve(int rsize)
-       // @@ TODO change this to use ctor, dtor, and operator=
-       // instead of preserving existing elements via binary copy via
-       // realloc?
-       {
-               assert(m_size >= 0);
-
-               int     old_size = m_buffer_size;
-               old_size = old_size;    // don't warn that this is unused.
-               m_buffer_size = rsize;
-
-               // Resize the buffer.
-               if (m_buffer_size == 0) {
-                       if (m_buffer) {
-                               tu_free(m_buffer, sizeof(T) * old_size);
-                       }
-                       m_buffer = 0;
-               } else {
-                       if (m_buffer) {
-                               m_buffer = (T*) tu_realloc(m_buffer, sizeof(T) 
* m_buffer_size, sizeof(T) * old_size);
-                       } else {
-                               m_buffer = (T*) tu_malloc(sizeof(T) * 
m_buffer_size);
-                               memset(m_buffer, 0, (sizeof(T) * 
m_buffer_size));
-                       }
-                       assert(m_buffer);       // need to throw (or something) 
on malloc failure!
-               }                       
-       }
-
-       void    transfer_members(array<T>* a)
-       // UNSAFE!  Low-level utility function: replace this array's
-       // members with a's members.
-       {
-               m_buffer = a->m_buffer;
-               m_size = a->m_size;
-               m_buffer_size = a->m_buffer_size;
-
-               a->m_buffer = 0;
-               a->m_size = 0;
-               a->m_buffer_size = 0;
-       }
-
-private:
-       T*      m_buffer;
-       int     m_size;
-       int     m_buffer_size;
+template<class T> class array : public std::vector<T>
+{
+public:
+       //int   size() const { return (int) std::vector<T>::size(); }
 };
 
 
@@ -438,7 +195,7 @@
        void    operator=(const hash<T,U,hash_functor>& src)
        {
                clear();
-               if (src.is_empty() == false)
+               if (src.empty() == false)
                {
                        set_capacity(src.size());
 
@@ -479,7 +236,7 @@
 
                entry*  natural_entry = &(E(index));
                
-               if (natural_entry->is_empty())
+               if (natural_entry->empty())
                {
                        // Put the new entry in.
                        new (natural_entry) entry(key, value, -1, hash_value);
@@ -491,7 +248,7 @@
                        for (;;)
                        {
                                blank_index = (blank_index + 1) & 
m_table->m_size_mask;
-                               if (E(blank_index).is_empty()) break;   // 
found it
+                               if (E(blank_index).empty()) break;      // 
found it
                        }
                        entry*  blank_entry = &E(blank_index);
 
@@ -548,7 +305,7 @@
                        for (int i = 0, n = m_table->m_size_mask; i <= n; i++)
                        {
                                entry*  e = &E(i);
-                               if (e->is_empty() == false)
+                               if (e->empty() == false)
                                {
                                        e->clear();
                                }
@@ -559,7 +316,7 @@
        }
 
        /// Returns true if the hash is empty.
-       bool    is_empty() const
+       bool    empty() const
        {
                return m_table == NULL || m_table->m_entry_count == 0;
        }
@@ -652,7 +409,7 @@
                        : m_next_in_chain(next_in_chain), 
m_hash_value(hash_value), first(key), second(value)
                {
                }
-               bool    is_empty() const { return m_next_in_chain == -2; }
+               bool    empty() const { return m_next_in_chain == -2; }
                bool    is_end_of_chain() const { return m_next_in_chain == -1; 
}
 
                void    clear()
@@ -671,7 +428,7 @@
 
                const entry&    operator*() const
                {
-                       assert(is_end() == false && 
(m_hash->E(m_index).is_empty() == false));
+                       assert(is_end() == false && (m_hash->E(m_index).empty() 
== false));
                        return m_hash->E(m_index);
                }
                const entry*    operator->() const { return &(operator*()); }
@@ -685,7 +442,7 @@
                        {
                                m_index++;
                                while (m_index <= m_hash->m_table->m_size_mask
-                                      && m_hash->E(m_index).is_empty())
+                                      && m_hash->E(m_index).empty())
                                {
                                        m_index++;
                                }
@@ -762,7 +519,7 @@
                // Scan til we hit the first valid entry.
                int     i0 = 0;
                while (i0 <= m_table->m_size_mask
-                       && E(i0).is_empty())
+                       && E(i0).empty())
                {
                        i0++;
                }
@@ -796,7 +553,7 @@
                int     index = hash_value & m_table->m_size_mask;
 
                const entry*    e = &E(index);
-               if (e->is_empty()) return -1;
+               if (e->empty()) return -1;
                if (int(e->m_hash_value & m_table->m_size_mask) != index) 
return -1;    // occupied by a collider
 
                for (;;)
@@ -817,7 +574,7 @@
                        assert(index >= 0 && index <= m_table->m_size_mask);
                        e = &E(index);
 
-                       assert(e->is_empty() == false);
+                       assert(e->empty() == false);
                }
                return -1;
        }
@@ -881,7 +638,7 @@
                        for (int i = 0, n = m_table->m_size_mask; i <= n; i++)
                        {
                                entry*  e = &E(i);
-                               if (e->is_empty() == false)
+                               if (e->empty() == false)
                                {
                                        // Insert old entry into new hash.
                                        new_hash.add(e->first, e->second);
Index: gnash/libbase/grid_index.h
diff -u gnash/libbase/grid_index.h:1.1 gnash/libbase/grid_index.h:1.2
--- gnash/libbase/grid_index.h:1.1      Tue Dec 20 20:57:00 2005
+++ gnash/libbase/grid_index.h  Sun Feb 12 02:12:07 2006
@@ -672,7 +672,7 @@
                                        // Find entry, and remove it.
                                        if ((*cell_array)[i] == entry)
                                        {
-                                               cell_array->remove(i);
+                                               
cell_array->erase(cell_array->begin() + i);
                                                break;
                                        }
                                }
Index: gnash/libbase/triangulate_impl.h
diff -u gnash/libbase/triangulate_impl.h:1.4 
gnash/libbase/triangulate_impl.h:1.5
--- gnash/libbase/triangulate_impl.h:1.4        Sat Jan 28 01:14:33 2006
+++ gnash/libbase/triangulate_impl.h    Sun Feb 12 02:12:07 2006
@@ -1993,7 +1993,7 @@
 
                        // Drop the joined poly.
                        delete m_polys[1];
-                       m_polys.remove(1);
+                       m_polys.erase(m_polys.begin() + 1);
                }
        }
 
@@ -2116,8 +2116,8 @@
        // ends up moving the data between ((v1+1), end) twice.
        if (0) {
                // Insert v1 first, so v0 doesn't get moved.
-               m_sorted_verts.insert(v1 + 1, v1_copy);
-               m_sorted_verts.insert(v0 + 1, v0_copy);
+               m_sorted_verts.insert(m_sorted_verts.begin() + v1 + 1, v1_copy);
+               m_sorted_verts.insert(m_sorted_verts.begin() + v0 + 1, v0_copy);
        }
        else
        // Faster, more obfuscated code to insert the two new verts.
Index: gnash/server/Movie.cpp
diff -u gnash/server/Movie.cpp:1.4 gnash/server/Movie.cpp:1.5
--- gnash/server/Movie.cpp:1.4  Sat Feb 11 01:57:02 2006
+++ gnash/server/Movie.cpp      Sun Feb 12 02:12:07 2006
@@ -194,7 +194,7 @@
 
                            if (imported)
                                {
-                                   m_imports.remove(i);
+                                   m_imports.erase(m_imports.begin() + i);
 
                                    // Hold a ref, to keep this source 
movie_definition alive.
                                    
m_import_source_movies.push_back(source_movie);
@@ -420,8 +420,8 @@
                                            break;
                                        }
                                }
-                           fonts->insert(insert, f);
-                           font_ids.insert(insert, id);
+                           fonts->insert(fonts->begin() + insert, f);
+                           font_ids.insert(font_ids.begin() + insert, id);
                        }
                }
        }
@@ -639,7 +639,7 @@
        
        void movie_root::clear_interval_timer(int x)
        {
-           m_interval_timers.remove(x-1);
+           m_interval_timers.erase(m_interval_timers.begin() + x-1);
            //m_interval_timers[x]->clearInterval();
        }
        
Index: gnash/server/MovieClipLoader.cpp
diff -u gnash/server/MovieClipLoader.cpp:1.6 
gnash/server/MovieClipLoader.cpp:1.7
--- gnash/server/MovieClipLoader.cpp:1.6        Mon Feb  6 04:11:04 2006
+++ gnash/server/MovieClipLoader.cpp    Sun Feb 12 02:12:07 2006
@@ -281,7 +281,7 @@
        {
        //log_msg("FIXME: Found onLoadStart!\n");
                as_c_function_ptr       func = method.to_c_function();
-               fn.env->set_variable("success", true, 0);
+               fn.env->set_variable("success", true, 
array<with_stack_entry>());
                if (func)
                {
                        // It's a C function.  Call it.
@@ -311,7 +311,7 @@
        {
        //log_msg("FIXME: Found onLoadStart!\n");
                as_c_function_ptr       func = method.to_c_function();
-               fn.env->set_variable("success", true, 0);
+               fn.env->set_variable("success", true, 
array<with_stack_entry>());
                if (func)
                {
                        // It's a C function.  Call it.
@@ -637,7 +637,7 @@
   if (fn.this_ptr->get_member("onLoadComplete", &method)) {
     //log_msg("FIXME: Found onLoadComplete!\n");
     as_c_function_ptr  func = method.to_c_function();
-    fn.env->set_variable("success", true, 0);
+    fn.env->set_variable("success", true, array<with_stack_entry>());
     if (func)
       {
         // It's a C function.  Call it.
@@ -676,7 +676,7 @@
   if (fn.this_ptr->get_member("onLoadError", &method)) {
     //log_msg("FIXME: Found onLoadError!\n");
     as_c_function_ptr  func = method.to_c_function();
-    fn.env->set_variable("success", true, 0);
+    fn.env->set_variable("success", true, array<with_stack_entry>());
     if (func)
       {
         // It's a C function.  Call it.
Index: gnash/server/Sprite.h
diff -u gnash/server/Sprite.h:1.5 gnash/server/Sprite.h:1.6
--- gnash/server/Sprite.h:1.5   Wed Feb  1 20:02:59 2006
+++ gnash/server/Sprite.h       Sun Feb 12 02:12:07 2006
@@ -319,8 +319,10 @@
 
                        // Initialize the flags for init action executed.
                        
m_init_actions_executed.resize(m_def->get_frame_count());
-                       memset(&m_init_actions_executed[0], 0,
-                          sizeof(m_init_actions_executed[0]) * 
m_init_actions_executed.size());
+                       for (array<bool>::iterator p = 
m_init_actions_executed.begin(); p != m_init_actions_executed.end(); ++p)
+                           {
+                               *p = false;
+                           }
                }
 
                // sprite instance of add_interval_handler()
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.42 gnash/server/action.cpp:1.43
--- gnash/server/action.cpp:1.42        Sat Feb 11 01:57:02 2006
+++ gnash/server/action.cpp     Sun Feb 12 02:12:07 2006
@@ -762,7 +762,7 @@
                        {
                                if (m_listeners[i] == NULL)
                                {
-                                       m_listeners.remove(i);
+                                       m_listeners.erase(m_listeners.begin() + 
i);
                                }
                        }
                }
@@ -791,7 +791,7 @@
                        {
                                if (m_listeners[i] == listener)
                                {
-                                       m_listeners.remove(i);
+                                       m_listeners.erase(m_listeners.begin() + 
i);
                                }
                        }
                }
Index: gnash/server/dlist.cpp
diff -u gnash/server/dlist.cpp:1.3 gnash/server/dlist.cpp:1.4
--- gnash/server/dlist.cpp:1.3  Sat Feb 11 01:57:03 2006
+++ gnash/server/dlist.cpp      Sun Feb 12 02:12:07 2006
@@ -185,7 +185,7 @@
                                if (dobj.m_character->get_depth() == depth)
                                {
                                        dobj.set_character(NULL);
-                                       m_display_object_array.remove(index);
+                                       
m_display_object_array.erase(m_display_object_array.begin() + index);
                                }
                        }
                }
@@ -215,7 +215,7 @@
                // Insert into the display list...
                assert(index == find_display_index(depth));
                
-               m_display_object_array.insert(index, di);
+               m_display_object_array.insert(m_display_object_array.begin() + 
index, di);
 
                // do the frame1 actions (if applicable) and the "onClipEvent 
(load)" event.
                ch->on_event_load();
@@ -455,7 +455,7 @@
                        {
                                dobj.set_character(NULL);
 
-                               m_display_object_array.remove(i);
+                               
m_display_object_array.erase(m_display_object_array.begin() + i);
                                r++;
                        }
                }
Index: gnash/server/font.cpp
diff -u gnash/server/font.cpp:1.2 gnash/server/font.cpp:1.3
--- gnash/server/font.cpp:1.2   Mon Jan 23 15:32:07 2006
+++ gnash/server/font.cpp       Sun Feb 12 02:12:07 2006
@@ -322,7 +322,7 @@
        {
                IF_VERBOSE_PARSE(log_msg("reading code table at offset %d\n", 
in->get_position()));
 
-               assert(m_code_table.is_empty());
+               assert(m_code_table.empty());
 
                if (m_wide_codes)
                {
Index: gnash/server/fontlib.cpp
diff -u gnash/server/fontlib.cpp:1.1 gnash/server/fontlib.cpp:1.2
--- gnash/server/fontlib.cpp:1.1        Tue Dec 20 21:01:18 2005
+++ gnash/server/fontlib.cpp    Sun Feb 12 02:12:07 2006
@@ -335,7 +335,7 @@
                        if (r.contains(p.m_x, p.m_y))
                        {
                                // Eliminate this point from consideration.
-                               s_anchor_points.remove(i);
+                               s_anchor_points.erase(s_anchor_points.begin() + 
i);
                                i--;
                        }
                }
Index: gnash/server/impl.cpp
diff -u gnash/server/impl.cpp:1.15 gnash/server/impl.cpp:1.16
--- gnash/server/impl.cpp:1.15  Mon Feb  6 04:11:04 2006
+++ gnash/server/impl.cpp       Sun Feb 12 02:12:07 2006
@@ -545,7 +545,7 @@
            if (m->get_ref_count() < 2)
                {
                    IF_VERBOSE_ACTION(log_msg("extern movie deleted\n"));
-                   s_extern_sprites.remove(i);
+                   s_extern_sprites.erase(s_extern_sprites.begin() + i);
                    i--;
                    root_m->drop_ref();
                }
Index: gnash/server/shape.cpp
diff -u gnash/server/shape.cpp:1.4 gnash/server/shape.cpp:1.5
--- gnash/server/shape.cpp:1.4  Sat Feb 11 15:47:13 2006
+++ gnash/server/shape.cpp      Sun Feb 12 02:12:07 2006
@@ -480,7 +480,7 @@
                                // Check the next strip first; trapezoids will
                                // tend to arrive in rotating order through
                                // the active strips.
-                               assert(m_last_strip_used >= -1 && 
m_last_strip_used < m_strips.size());
+                               assert(m_last_strip_used >= -1 && 
m_last_strip_used < (int) m_strips.size());
                                int i = m_last_strip_used + 1, n = 
m_strips.size();
                                for ( ; i < n; i++)
                                {
@@ -550,7 +550,7 @@
                                            && big_strip[last - 1] == str[0])
                                        {
                                                // Strips fit right together.  
Append.
-                                               big_strip.append(&str[2], 
str.size() - 2);
+                                               
big_strip.insert(big_strip.end(), str.begin() + 2, str.end());
                                        }
                                        else if (big_strip[last] == str[0]
                                                 && big_strip[last - 1] == 
str[1])
@@ -558,7 +558,7 @@
                                                // Strips fit together with a 
half-twist.
                                                point   to_dup = big_strip[last 
- 1];
                                                big_strip.push_back(to_dup);
-                                               big_strip.append(&str[2], 
str.size() - 2);
+                                               
big_strip.insert(big_strip.end(), str.begin() + 2, str.end());
                                        }
                                        else
                                        {
@@ -566,7 +566,7 @@
                                                point   to_dup = 
big_strip[last];
                                                big_strip.push_back(to_dup);
                                                big_strip.push_back(str[0]);
-                                               big_strip.append(str);
+                                               
big_strip.insert(big_strip.end(), str.begin(), str.end());
                                        }
                                }
 
Index: gnash/server/tesselate.cpp
diff -u gnash/server/tesselate.cpp:1.2 gnash/server/tesselate.cpp:1.3
--- gnash/server/tesselate.cpp:1.2      Sat Feb 11 01:57:03 2006
+++ gnash/server/tesselate.cpp  Sun Feb 12 02:12:07 2006
@@ -324,7 +324,7 @@
                        }
                }
                
-               s_current_segments.release();
+               s_current_segments.clear();
        }
 
 
@@ -417,7 +417,7 @@
 
                s_accepter = NULL;
 
-               s_current_path.release();
+               s_current_path.clear();
        }
 
 
Index: gnash/server/textformat.cpp
diff -u gnash/server/textformat.cpp:1.3 gnash/server/textformat.cpp:1.4
--- gnash/server/textformat.cpp:1.3     Thu Feb  2 09:40:50 2006
+++ gnash/server/textformat.cpp Sun Feb 12 02:12:07 2006
@@ -123,7 +123,7 @@
   //
   // TODO we should handle setTextFormat as a method on TextField,
   // instead of doing this.
-  fn.env->set_variable("setTextFormat", &textformat_setformat, 0);
+  fn.env->set_variable("setTextFormat", &textformat_setformat, 
array<with_stack_entry>());
   
   fn.result->set_as_object_interface(text_obj);
 }
Index: gnash/server/timers.cpp
diff -u gnash/server/timers.cpp:1.3 gnash/server/timers.cpp:1.4
--- gnash/server/timers.cpp:1.3 Mon Feb  6 04:11:04 2006
+++ gnash/server/timers.cpp     Sun Feb 12 02:12:07 2006
@@ -178,7 +178,7 @@
         {
           local_name  = fn.env->m_local_frames[i].m_name;
           local_val = fn.env->m_local_frames[i].m_value;
-          fn.env->set_variable(local_name, local_val, 0);
+          fn.env->set_variable(local_name, local_val, 
array<with_stack_entry>());
         }
       }
     }
Index: gnash/server/xml.cpp
diff -u gnash/server/xml.cpp:1.9 gnash/server/xml.cpp:1.10
--- gnash/server/xml.cpp:1.9    Sat Feb 11 01:57:03 2006
+++ gnash/server/xml.cpp        Sun Feb 12 02:12:07 2006
@@ -911,7 +911,7 @@
 #if 1
     if (fn.this_ptr->get_member("onLoad", &method)) {
         //    log_msg("FIXME: Found onLoad!\n");
-        fn.env->set_variable("success", true, 0);
+        fn.env->set_variable("success", true, array<with_stack_entry>());
         fn.env->bottom(fn.first_arg_bottom_index) = true;
         as_c_function_ptr      func = method.to_c_function();
         if (func)
@@ -1009,7 +1009,7 @@
         if (fn.this_ptr->get_member("onData", &method)) {
             log_msg("FIXME: Found onData!\n");
             as_c_function_ptr  func = method.to_c_function();
-            fn.env->set_variable("success", true, 0);
+            fn.env->set_variable("success", true, array<with_stack_entry>());
             if (func)
                 {
                     // It's a C function.  Call it.
Index: gnash/server/xmlsocket.h
diff -u gnash/server/xmlsocket.h:1.3 gnash/server/xmlsocket.h:1.4
--- gnash/server/xmlsocket.h:1.3        Sat Jan 28 01:14:33 2006
+++ gnash/server/xmlsocket.h    Sun Feb 12 02:12:07 2006
@@ -52,7 +52,7 @@
   bool xmlmsg() { return _xmldata; }
   
   void messagesClear()      { _messages.clear(); }
-  void messageRemove(int x) { _messages.remove(x); }
+  void messageRemove(int x) { _messages.erase(_messages.begin() + x); }
   int messagesCount()       { return _messages.size(); }
   tu_string operator [] (int x)  { return _messages[x]; }
   




reply via email to

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