diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-07-04 15:25:59 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-07-04 15:25:59 +0000 |
| commit | 60437ac397d41678daba5daece227240e8ddd364 (patch) | |
| tree | 31f18c8296ffde9122492b46623375fc98585b17 /src/2geom/intersection.h | |
| parent | 2Geom CMake adjustment (diff) | |
| download | inkscape-60437ac397d41678daba5daece227240e8ddd364.tar.gz inkscape-60437ac397d41678daba5daece227240e8ddd364.zip | |
Upgrade to 2Geom r2413
(bzr r14059.2.18)
Diffstat (limited to 'src/2geom/intersection.h')
| -rw-r--r-- | src/2geom/intersection.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/2geom/intersection.h b/src/2geom/intersection.h index ae4b50dd1..bbce19947 100644 --- a/src/2geom/intersection.h +++ b/src/2geom/intersection.h @@ -44,6 +44,7 @@ namespace Geom { */ template <typename TimeA = Coord, typename TimeB = TimeA> class Intersection + : boost::totally_ordered< Intersection<TimeA, TimeB> > { public: /** @brief Construct from shape references and time values. @@ -79,6 +80,17 @@ public: swap(a._point, b._point); } + bool operator==(Intersection const &other) const { + if (first != other.first) return false; + if (second != other.second) return false; + return true; + } + bool operator<(Intersection const &other) const { + if (first < other.first) return true; + if (first == other.first && second < other.second) return true; + return false; + } + public: /// First shape and time value. TimeA first; |
