gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10278: Const correct point_test_loc


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10278: Const correct point_test_local, drop some unused code.
Date: Fri, 14 Nov 2008 11:31:33 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10278
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Fri 2008-11-14 11:31:33 +0100
message:
  Const correct point_test_local, drop some unused code.
modified:
  libcore/DynamicShape.h
  libcore/MovieClip.cpp
  libcore/parser/character_def.h
  libcore/parser/shape_character_def.cpp
  libcore/parser/shape_character_def.h
=== modified file 'libcore/DynamicShape.h'
--- a/libcore/DynamicShape.h    2008-10-19 18:04:05 +0000
+++ b/libcore/DynamicShape.h    2008-11-14 10:31:33 +0000
@@ -134,7 +134,8 @@
        //       would result in a triangle and a stroke, which should fail the 
last hitTest(2,8).
        //
        //
-       bool point_test_local(boost::int32_t x, boost::int32_t y, SWFMatrix& wm)
+       bool point_test_local(boost::int32_t x, boost::int32_t y,
+            const SWFMatrix& wm)
        {
                finalize();
                return shape_character_def::point_test_local(x, y, wm);
@@ -156,10 +157,6 @@
 
 private:
 
-       /// Movie definition containing the code 
-       /// that created this shape.
-       movie_definition* _mdef;
-
        /// Initialize a new path
        //
        /// Used when changing style or moving the pen

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2008-11-13 15:33:38 +0000
+++ b/libcore/MovieClip.cpp     2008-11-14 10:31:33 +0000
@@ -259,15 +259,13 @@
 } // anonymous namespace
 
 
-MovieClip::MovieClip(
-        movie_definition* def, movie_instance* r,
+MovieClip::MovieClip( movie_definition* def, movie_instance* r,
         character* parent, int id)
     :
     character(parent, id),
     m_root(r),
     _drawable(new DynamicShape()),
     _drawable_inst(_drawable->create_character_instance(this, 0)),
-    //m_goto_frame_action_list(),
     m_play_state(PLAY),
     m_current_frame(0),
     m_has_looped(false),
@@ -1779,10 +1777,9 @@
     MouseEntityFinder finder(wp, pp);
     m_display_list.visitAll(finder);
     character* ch = finder.getEntity();
-    if ( ! ch ) 
-    {
-        ch = _drawable_inst->get_topmost_mouse_entity(pp.x, pp.y);
-    }
+
+    // It doesn't make any sense to query _drawable_inst, as it's
+    // a generic character and not a referencable character.
 
     return ch; // might be NULL
 }

=== modified file 'libcore/parser/character_def.h'
--- a/libcore/parser/character_def.h    2008-10-31 10:38:22 +0000
+++ b/libcore/parser/character_def.h    2008-11-14 10:31:33 +0000
@@ -70,7 +70,8 @@
        ///     Current world SWFMatrix of the instance we want to check.
        ///     This is needed to properly scale non-scalable strokes.
        ///
-       virtual bool point_test_local(boost::int32_t /*x*/, boost::int32_t 
/*y*/, SWFMatrix& /*wm*/)
+       virtual bool point_test_local(boost::int32_t /*x*/, boost::int32_t 
/*y*/,
+            const SWFMatrix& /*wm*/)
        {
                return false;
        }

=== modified file 'libcore/parser/shape_character_def.cpp'
--- a/libcore/parser/shape_character_def.cpp    2008-11-06 22:57:43 +0000
+++ b/libcore/parser/shape_character_def.cpp    2008-11-14 10:31:33 +0000
@@ -652,7 +652,7 @@
 }
 
 bool  shape_character_def::point_test_local(boost::int32_t x,
-        boost::int32_t y, SWFMatrix& wm)
+        boost::int32_t y, const SWFMatrix& wm)
 {
     /*
     Principle:

=== modified file 'libcore/parser/shape_character_def.h'
--- a/libcore/parser/shape_character_def.h      2008-11-07 08:37:30 +0000
+++ b/libcore/parser/shape_character_def.h      2008-11-14 10:31:33 +0000
@@ -50,7 +50,7 @@
     /// The SWFMatrix will be used for lines with non-scalable strokes.
     ///
     virtual bool point_test_local(boost::int32_t x, boost::int32_t y,
-            SWFMatrix& wm);
+            const SWFMatrix& wm);
 
     /// \brief
     /// Read a shape definition as included in DEFINEFONT*,


reply via email to

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