From: mental Date: Sun, 4 Mar 2007 19:06:52 +0000 (+0000) Subject: remove remaining use of assume in nr-rect.cpp X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=656cbf30d02e637fe9f74a854e3bdd70683f0658;p=inkscape.git remove remaining use of assume in nr-rect.cpp --- diff --git a/src/libnr/nr-rect.cpp b/src/libnr/nr-rect.cpp index c3d23a619..c681783c7 100644 --- a/src/libnr/nr-rect.cpp +++ b/src/libnr/nr-rect.cpp @@ -261,15 +261,13 @@ void Rect::expandTo(Point p) { /** Returns the set of points shared by both rectangles. */ Maybe Rect::intersection(Maybe const &a, Maybe const &b) { - if ( a == Nothing() || b == Nothing() ) { + if ( !a || !b ) { return Nothing(); } else { - Rect const &ra=a.assume(); - Rect const &rb=b.assume(); Rect r; for ( int i=0 ; i < 2 ; i++ ) { - r._min[i] = MAX(ra._min[i], rb._min[i]); - r._max[i] = MIN(ra._max[i], rb._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(); }