Code

Whoops, forgot to friend the methods I moved out of Rect
authormental <mental@users.sourceforge.net>
Fri, 9 Mar 2007 01:32:29 +0000 (01:32 +0000)
committermental <mental@users.sourceforge.net>
Fri, 9 Mar 2007 01:32:29 +0000 (01:32 +0000)
src/libnr/nr-rect.cpp
src/libnr/nr-rect.h

index 9047e4e1c53faa2762b0bffe5b22aeea695800df..3ffe06dc857ed03279abeed5631d9bd81464e63f 100644 (file)
@@ -290,8 +290,8 @@ Maybe<Rect> intersection(Maybe<Rect const &> a, Maybe<Rect const &> b) {
     } else {
         Rect r;
         for ( int i=0 ; i < 2 ; i++ ) {
-            r._min[i] = MAX(a->_min[i], b->_min[i]);
-            r._max[i] = MIN(a->_max[i], b->_max[i]);
+            r._min[i] = MAX(a->min()[i], b->min()[i]);
+            r._max[i] = MIN(a->max()[i], b->max()[i]);
             if ( r._min[i] > r._max[i] ) {
                return Nothing();
             }
index 5e2332bf278315765af1a0d850e628f04e0275fc..4ae5642ae795015a614ba9ca1346f11386439d66 100644 (file)
@@ -176,6 +176,8 @@ private:
     Point _min, _max;
 
     friend class MaybeStorage<Rect>;
+    friend Maybe<Rect> intersection(Maybe<Rect const &>, Maybe<Rect const &>);
+    friend Rect union_bounds(Rect const &, Rect const &);
 };
 
 template <>