gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...
Date: Thu, 01 Mar 2007 09:38:18 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/03/01 09:38:18

Modified files:
        .              : ChangeLog 
        server         : video_stream_instance.cpp 
        libgeometry    : snappingrange.h 

Log message:
        some code cleanup

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2505&r2=1.2506
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/snappingrange.h?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.2505
retrieving revision 1.2506
diff -u -b -r1.2505 -r1.2506
--- ChangeLog   1 Mar 2007 08:00:40 -0000       1.2505
+++ ChangeLog   1 Mar 2007 09:38:18 -0000       1.2506
@@ -1,3 +1,9 @@
+2007-03-01 Udo Giacomozzi <address@hidden>
+
+       * server/video_stream_instance.cpp: simplify add_invalidated_bounds()
+       * libgeometry/snappingrange.h: Clarify comment; use initialization list
+         in constructor; some minimal changes  
+       
 2007-03-01 Zou Lunkai <address@hidden>
 
        * server/dlist.cpp: keep function declaration consistent with the 
headfile;

Index: server/video_stream_instance.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/video_stream_instance.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- server/video_stream_instance.cpp    28 Feb 2007 17:25:26 -0000      1.10
+++ server/video_stream_instance.cpp    1 Mar 2007 09:38:18 -0000       1.11
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: video_stream_instance.cpp,v 1.10 2007/02/28 17:25:26 udog Exp $
+// $Id: video_stream_instance.cpp,v 1.11 2007/03/01 09:38:18 udog Exp $
 
 #include "sprite_instance.h"
 #include "video_stream_instance.h"
@@ -116,9 +116,9 @@
 video_stream_instance::add_invalidated_bounds(InvalidatedRanges& ranges, 
        bool /*force*/)
 {
-       rect bounds;
-       bounds.set_world();
-       ranges.add(bounds.getRange());
+       Range2d<float> bounds; 
+       bounds.setWorld();
+       ranges.add(bounds);
 }
 
 } // end of namespace gnash

Index: libgeometry/snappingrange.h
===================================================================
RCS file: /cvsroot/gnash/gnash/libgeometry/snappingrange.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libgeometry/snappingrange.h 28 Feb 2007 18:33:21 -0000      1.5
+++ libgeometry/snappingrange.h 1 Mar 2007 09:38:18 -0000       1.6
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: snappingrange.h,v 1.5 2007/02/28 18:33:21 strk Exp $
+// $Id: snappingrange.h,v 1.6 2007/03/01 09:38:18 udog Exp $
 
 #ifndef GNASH_SNAPPINGRANGE_H
 #define GNASH_SNAPPINGRANGE_H
@@ -68,17 +68,21 @@
 {
 public:
        typedef geometry::Range2d<T> RangeType;
+       typedef std::vector<RangeType> RangeList; // TODO: list might be more 
appropriate
+       typedef typename RangeList::size_type size_type;        
        
        /// distance (horizontally *plus* vertically) below ranges are snapped
-       /// You MUST initialize this! 
+       /// You should initialize this when single_mode=false! 
        T snap_distance;
        
        /// if set, only a single, outer range is maintained (extended). 
        bool single_mode;       
        
-       SnappingRanges2d() {
-               snap_distance = 0;
-               single_mode = false;
+       SnappingRanges2d() 
+               :
+               snap_distance(0),
+               single_mode(false)
+       {
        }
        
        /// Add a Range to the set, merging when possible and appropriate
@@ -96,7 +100,6 @@
                
                        if (_ranges.empty()) {
                                RangeType temp;
-                               temp.setNull();
                                _ranges.push_back(temp);
                        }
                        
@@ -225,11 +228,11 @@
        
        /// Returns true, when there is no range
        bool isNull() const {
-               return size()==0;
+               return _ranges.empty();
        }
        
        /// Returns the number of ranges in the list
-       int size() const {
+       size_type size() const {
                return _ranges.size();
        }
        
@@ -294,8 +297,6 @@
                return min(a,b);
        }
        
-       typedef std::vector<RangeType> RangeList; // TODO: list might be more 
appropriate
-       
        // The current Ranges list
        RangeList _ranges;
        




reply via email to

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