gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10433: Drop old or unused code.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10433: Drop old or unused code.
Date: Mon, 15 Dec 2008 09:08:03 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10433
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2008-12-15 09:08:03 +0100
message:
  Drop old or unused code.
modified:
  libcore/asobj/NetStream_as.cpp
  libcore/asobj/Sound.cpp
  libcore/character.cpp
  libcore/character.h
  libcore/generic_character.cpp
  libcore/generic_character.h
  libcore/vm/with_stack_entry.h
    ------------------------------------------------------------
    revno: 10409.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-12-11 17:56:44 +0100
    message:
      Move character constructor to the cpp file to save rebuilding, and because
      there's not much advantage having it in the header.
    modified:
      libcore/character.cpp
      libcore/character.h
    ------------------------------------------------------------
    revno: 10409.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-12-11 18:09:09 +0100
    message:
      Drop enclose_own_bounds, which isn't used, implemented or documented.
    modified:
      libcore/generic_character.cpp
      libcore/generic_character.h
    ------------------------------------------------------------
    revno: 10409.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-12-11 18:15:27 +0100
    message:
      Drop some more stuff.
    modified:
      libcore/vm/with_stack_entry.h
    ------------------------------------------------------------
    revno: 10409.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-12-11 18:21:57 +0100
    message:
      Drop commented-out memcpys.
    modified:
      libcore/asobj/NetStream_as.cpp
      libcore/asobj/Sound.cpp
    ------------------------------------------------------------
    revno: 10409.1.5
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-12-11 19:23:10 +0100
    message:
      Drop generic_character::get_character_def(), which wasn't used, and quite
      right too.
    modified:
      libcore/generic_character.h
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp    2008-12-13 10:59:04 +0000
+++ b/libcore/asobj/NetStream_as.cpp    2008-12-15 08:08:03 +0000
@@ -1507,7 +1507,7 @@
         assert( ! (samples->m_size%2) ); 
         int n = std::min<int>(samples->m_size, len);
         std::copy(samples->m_ptr, samples->m_ptr+n, stream);
-        //memcpy(stream, samples->m_ptr, n);
+
         stream += n;
         samples->m_ptr += n;
         samples->m_size -= n;

=== modified file 'libcore/asobj/Sound.cpp'
--- a/libcore/asobj/Sound.cpp   2008-12-10 12:27:24 +0000
+++ b/libcore/asobj/Sound.cpp   2008-12-11 17:21:57 +0000
@@ -527,7 +527,6 @@
         //log_debug(" consuming %d bytes of decoded audio", n);
 
         std::copy(_leftOverPtr, _leftOverPtr+n, stream);
-        //memcpy(stream, _leftOverPtr, n);
 
         stream += n;
         _leftOverPtr += n;

=== modified file 'libcore/character.cpp'
--- a/libcore/character.cpp     2008-12-05 10:31:29 +0000
+++ b/libcore/character.cpp     2008-12-11 16:56:44 +0000
@@ -56,7 +56,7 @@
 }
 
 
-// Define static const members or there will be linkage problems.
+// Define static const members.
 const int character::lowerAccessibleBound;
 const int character::upperAccessibleBound;
 const int character::staticDepthOffset;
@@ -65,7 +65,33 @@
 const int character::dynClipDepthValue;
 
 // Initialize unnamed instance count
-unsigned int character::_lastUnnamedInstanceNum=0;
+unsigned int character::_lastUnnamedInstanceNum = 0;
+
+character::character(character* parent, int id)
+    :
+    m_parent(parent),
+    m_invalidated(true),
+    m_child_invalidated(true),
+    m_id(id),
+    m_depth(0),
+    _xscale(100),
+    _yscale(100),
+    _rotation(0),
+    _volume(100),
+    m_ratio(0),
+    m_clip_depth(noClipDepthValue),
+    _unloaded(false),
+    _destroyed(false),
+    _mask(0),
+    _maskee(0),
+    _blendMode(BLENDMODE_NORMAL),
+    _visible(true),
+    _scriptTransformed(false),
+    _dynamicallyCreated(false)
+{
+    assert((!parent && m_id == -1) || ((parent) && m_id >= 0));
+    assert(m_old_invalidated_ranges.isNull());
+}
 
 /*protected static*/
 std::string
@@ -115,17 +141,6 @@
        return m;
 }
 
-#if 0
-void
-character::get_mouse_state(int& x, int& y, int& buttons)
-{
-       assert(m_parent != NULL);
-#ifndef GNASH_USE_GC
-       assert(m_parent->get_ref_count() > 0);
-#endif // GNASH_USE_GC
-       get_parent()->get_mouse_state(x, y, buttons);
-}
-#endif
 
 as_object*
 character::get_path_element_character(string_table::key key)
@@ -970,7 +985,8 @@
 {
 
        movie_root& root = _vm.getRoot();
-       std::auto_ptr<ExecutableCode> event(new 
QueuedEvent(boost::intrusive_ptr<character>(this), id));
+       std::auto_ptr<ExecutableCode> event(
+            new QueuedEvent(boost::intrusive_ptr<character>(this), id));
        root.pushAction(event, lvl);
 }
 
@@ -980,7 +996,8 @@
        Events::const_iterator it = _event_handlers.find(id);
        if ( it != _event_handlers.end() ) return true;
 
-       boost::intrusive_ptr<as_function> method = 
getUserDefinedEventHandler(id.get_function_key());
+       boost::intrusive_ptr<as_function> method = 
+        getUserDefinedEventHandler(id.get_function_key());
        if (method) return true;
 
        return false;
@@ -1029,7 +1046,6 @@
     // we don't need to recompute the SWFMatrix from the 
     // caches.
 
-
        SWFMatrix m = getMatrix();
 
     m.set_x_scale(xscale);
@@ -1219,14 +1235,6 @@
        return target;
 }
 
-#if 0
-/*public*/
-std::string
-character::get_text_value() const
-{
-       return getTarget();
-}
-#endif
 
 void
 character::destroy()
@@ -1285,7 +1293,7 @@
                // on any previously registered maskee
                // so we make sure to set our _mask to 
                // NULL before getting called again
-               _mask->setMaskee(NULL);
+               _mask->setMaskee(0);
        }
 
        // if we had a maskee, notify it to stop using
@@ -1324,8 +1332,9 @@
        {
                // We don't want the maskee to call setMaskee(null)
                // on us again
-               log_debug(" %s.setMaskee(%s) : previously masked char %s being 
set as non-masked",
-                       getTarget(), maskee ? maskee->getTarget() : "null", 
_maskee->getTarget());
+               log_debug(" %s.setMaskee(%s) : previously masked char %s "
+                "being set as non-masked", getTarget(), 
+                maskee ? maskee->getTarget() : "null", _maskee->getTarget());
                _maskee->_mask = NULL;
        }
 
@@ -1412,8 +1421,10 @@
     return get_root();
 }
 
+
 namespace {
 
+
 const BlendModeMap&
 getBlendModeMap()
 {

=== modified file 'libcore/character.h'
--- a/libcore/character.h       2008-12-05 09:37:07 +0000
+++ b/libcore/character.h       2008-12-11 16:56:44 +0000
@@ -64,32 +64,7 @@
 
 public:
 
-    character(character* parent, int id)
-        :
-        m_parent(parent),
-        m_invalidated(true),
-        m_child_invalidated(true),
-        m_id(id),
-        m_depth(0),
-        _xscale(100),
-        _yscale(100),
-        _rotation(0),
-        _volume(100),
-        m_ratio(0),
-        m_clip_depth(noClipDepthValue),
-        _unloaded(false),
-        _destroyed(false),
-        _mask(0),
-        _maskee(0),
-        _blendMode(BLENDMODE_NORMAL),
-        _visible(true),
-        _scriptTransformed(false),
-        _dynamicallyCreated(false)
-    {
-        assert((parent == NULL && m_id == -1) || 
-                (parent != NULL && m_id >= 0));
-        assert(m_old_invalidated_ranges.isNull());
-    }
+    character(character* parent, int id);
 
     /// The lowest placeable and accessible depth for a character.
     /// Macromedia Flash help says: depth starts at -16383 (0x3FFF)
@@ -1258,9 +1233,9 @@
 std::ostream&
 operator<<(std::ostream& o, character::BlendMode bm);
 
-
 } // end namespace gnash
 
+
 #ifdef DEBUG_SET_INVALIDATED
 #define set_invalidated() set_invalidated(__FILE__, __LINE__)
 #endif

=== modified file 'libcore/generic_character.cpp'
--- a/libcore/generic_character.cpp     2008-12-05 09:37:07 +0000
+++ b/libcore/generic_character.cpp     2008-12-11 17:09:09 +0000
@@ -36,12 +36,6 @@
   }    
 }
 
-void
-generic_character::enclose_own_bounds(rect *) const
-{
-  log_unimpl("generic_character::enclose_own_bounds");
-  abort(); // TO BE IMPLEMENTED!!!!!
-}
 
 bool
 generic_character::pointInShape(boost::int32_t  x, boost::int32_t  y) const

=== modified file 'libcore/generic_character.h'
--- a/libcore/generic_character.h       2008-07-04 10:00:28 +0000
+++ b/libcore/generic_character.h       2008-12-11 18:23:10 +0000
@@ -70,11 +70,9 @@
        /// override in your subclass to change this
        virtual bool can_handle_mouse_event() const {
                return false;
-               //assert(m_parent != NULL);
-               //return m_parent->can_handle_mouse_event();
        }
 
-       virtual void    display();
+       virtual void display();
 
        rect getBounds() const
        {
@@ -88,7 +86,8 @@
        /// If you need to check for a generic character to contain a 
        /// given point, use the pointInShape() function instead.
        /// 
-       virtual character* get_topmost_mouse_entity(boost::int32_t /*x*/, 
boost::int32_t /*y*/)
+       virtual character* get_topmost_mouse_entity(boost::int32_t /*x*/, 
+            boost::int32_t /*y*/)
        {
                return NULL;
        }
@@ -96,13 +95,6 @@
        // See dox in character.h
        virtual bool pointInShape(boost::int32_t  x, boost::int32_t  y) const;
 
-       /// \brief
-       /// Return the character definition from which this
-       /// instance derive. 
-       character_def* get_character_def() { return m_def.get(); }
-  
-       void enclose_own_bounds(rect *) const;
-
        void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);
     
 

=== modified file 'libcore/vm/with_stack_entry.h'
--- a/libcore/vm/with_stack_entry.h     2008-03-26 21:34:20 +0000
+++ b/libcore/vm/with_stack_entry.h     2008-12-11 17:15:27 +0000
@@ -31,12 +31,6 @@
 class with_stack_entry
 {
 public:        
-       with_stack_entry()
-               :
-               _object(NULL),
-               _block_end_pc(0)
-       {
-       }
 
        with_stack_entry(as_object* obj, size_t end)
                :


reply via email to

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