diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-09 05:35:40 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-09 05:35:40 +0000 |
| commit | 25be488f57d32984ba7ac5c68ac09118554b1245 (patch) | |
| tree | 6ba2ac61803b3a3212b5efc9df8b40a1f349b90c /src/libnr | |
| parent | do not return empty intersections any longer (diff) | |
| download | inkscape-25be488f57d32984ba7ac5c68ac09118554b1245.tar.gz inkscape-25be488f57d32984ba7ac5c68ac09118554b1245.zip | |
fix crash
(bzr r2589)
Diffstat (limited to 'src/libnr')
| -rw-r--r-- | src/libnr/nr-rect.cpp | 2 | ||||
| -rw-r--r-- | src/libnr/nr-rect.h | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libnr/nr-rect.cpp b/src/libnr/nr-rect.cpp index fd291218b..2d4629d42 100644 --- a/src/libnr/nr-rect.cpp +++ b/src/libnr/nr-rect.cpp @@ -285,7 +285,7 @@ void Rect::expandTo(Point p) { } /** Returns the set of points shared by both rectangles. */ -Maybe<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 { diff --git a/src/libnr/nr-rect.h b/src/libnr/nr-rect.h index 4ae5642ae..b632261aa 100644 --- a/src/libnr/nr-rect.h +++ b/src/libnr/nr-rect.h @@ -176,7 +176,7 @@ private: Point _min, _max; friend class MaybeStorage<Rect>; - friend Maybe<Rect> intersection(Maybe<Rect const &>, Maybe<Rect const &>); + friend Maybe<Rect> intersection(Maybe<Rect> const &, Maybe<Rect> const &); friend Rect union_bounds(Rect const &, Rect const &); }; @@ -197,25 +197,25 @@ private: }; /** Returns the set of points shared by both rectangles. */ -Maybe<Rect> intersection(Maybe<Rect const &> a, Maybe<Rect const &> b); +Maybe<Rect> intersection(Maybe<Rect> const & a, Maybe<Rect> const & b); /** Returns the smallest rectangle that encloses both rectangles. */ Rect union_bounds(Rect const &a, Rect const &b); -inline Rect union_bounds(Maybe<Rect const &> a, Rect const &b) { +inline Rect union_bounds(Maybe<Rect> const & a, Rect const &b) { if (a) { return union_bounds(*a, b); } else { return b; } } -inline Rect union_bounds(Rect const &a, Maybe<Rect const &> b) { +inline Rect union_bounds(Rect const &a, Maybe<Rect> const & b) { if (b) { return union_bounds(a, *b); } else { return a; } } -inline Maybe<Rect> union_bounds(Maybe<Rect const &> a, Maybe<Rect const &> b) +inline Maybe<Rect> union_bounds(Maybe<Rect> const & a, Maybe<Rect> const & b) { if (!a) { return b; |
