From 656cbf30d02e637fe9f74a854e3bdd70683f0658 Mon Sep 17 00:00:00 2001 From: mental Date: Sun, 4 Mar 2007 19:06:52 +0000 Subject: [PATCH] remove remaining use of assume in nr-rect.cpp --- src/libnr/nr-rect.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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(); } -- 2.30.2