diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-09 00:25:51 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-09 00:25:51 +0000 |
| commit | b617f8eb8c9c9467caa4c15ba71259661d9222ce (patch) | |
| tree | 515a14bc288f031bbb9b082dc5839e66fdb961cd /src/libnr/nr-rect.cpp | |
| parent | fix reference maybes by separate specialization (diff) | |
| download | inkscape-b617f8eb8c9c9467caa4c15ba71259661d9222ce.tar.gz inkscape-b617f8eb8c9c9467caa4c15ba71259661d9222ce.zip | |
specialize MaybeStorage for Rect, and start using reference maybes to
avoid some copies
(bzr r2582)
Diffstat (limited to 'src/libnr/nr-rect.cpp')
| -rw-r--r-- | src/libnr/nr-rect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnr/nr-rect.cpp b/src/libnr/nr-rect.cpp index 21d3f470a..9047e4e1c 100644 --- a/src/libnr/nr-rect.cpp +++ b/src/libnr/nr-rect.cpp @@ -284,7 +284,7 @@ void Rect::expandTo(Point p) { } /** Returns the set of points shared by both rectangles. */ -Maybe<Rect> Rect::intersection(Maybe<Rect> const &a, Maybe<Rect> const &b) { +Maybe<Rect> intersection(Maybe<Rect const &> a, Maybe<Rect const &> b) { if ( !a || !b ) { return Nothing(); } else { @@ -301,7 +301,7 @@ Maybe<Rect> Rect::intersection(Maybe<Rect> const &a, Maybe<Rect> const &b) { } /** returns the smallest rectangle containing both rectangles */ -Rect Rect::union_bounds(Rect const &a, Rect const &b) { +Rect union_bounds(Rect const &a, Rect const &b) { Rect r; for ( int i=0 ; i < 2 ; i++ ) { r._min[i] = MIN(a._min[i], b._min[i]); |
