summaryrefslogtreecommitdiff
path: root/src/polygon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/polygon.cpp')
-rw-r--r--src/polygon.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/polygon.cpp b/src/polygon.cpp
index 63628c5..17b4cff 100644
--- a/src/polygon.cpp
+++ b/src/polygon.cpp
@@ -94,7 +94,7 @@ void Polygon::move (double x, double y)
namespace { // start of anonymous namespace
struct SweepEvent;
struct SegmentComp : public binary_function<SweepEvent*, SweepEvent*, bool> {
- bool operator() (SweepEvent* e1, SweepEvent* e2);
+ bool operator() (SweepEvent* e1, SweepEvent* e2) const;
};
struct SweepEvent {
@@ -117,7 +117,7 @@ namespace { // start of anonymous namespace
};
struct SweepEventComp : public binary_function<SweepEvent*, SweepEvent*, bool> {
- bool operator() (SweepEvent* e1, SweepEvent* e2) {
+ bool operator() (SweepEvent* e1, SweepEvent* e2) const {
if (e1->p.x < e2->p.x) // Different x coordinate
return true;
if (e2->p.x < e1->p.x) // Different x coordinate
@@ -133,7 +133,7 @@ namespace { // start of anonymous namespace
} // end of anonymous namespace
-bool SegmentComp::operator() (SweepEvent* e1, SweepEvent* e2) {
+bool SegmentComp::operator() (SweepEvent* e1, SweepEvent* e2) const {
if (e1 == e2)
return false;
if (signedArea (e1->p, e1->other->p, e2->p) != 0 || signedArea (e1->p, e1->other->p, e2->other->p) != 0) {