From f5f11d4a0f2746b16e27a70d6e1560caff252179 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Tue, 28 Jul 2020 18:04:39 +0200
Subject: [PATCH] [GL] Add missing const to SegmentIterator::op==().

gcc-8.3 complains otherwise about the comparison
operator being missing for two constant SegmentIterators.
---
 GeoLib/Polyline.cpp | 4 ++--
 GeoLib/Polyline.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/GeoLib/Polyline.cpp b/GeoLib/Polyline.cpp
index 3522fa12dc8..0c21c3cc374 100644
--- a/GeoLib/Polyline.cpp
+++ b/GeoLib/Polyline.cpp
@@ -524,12 +524,12 @@ LineSegment Polyline::SegmentIterator::operator*()
     return _polyline->getSegment(_segment_number);
 }
 
-bool Polyline::SegmentIterator::operator==(SegmentIterator const& other)
+bool Polyline::SegmentIterator::operator==(SegmentIterator const& other) const
 {
     return !(*this != other);
 }
 
-bool Polyline::SegmentIterator::operator!=(SegmentIterator const& other)
+bool Polyline::SegmentIterator::operator!=(SegmentIterator const& other) const
 {
     return other._segment_number != _segment_number ||
            other._polyline != _polyline;
diff --git a/GeoLib/Polyline.h b/GeoLib/Polyline.h
index f043f1f67ed..13dbd0e72dd 100644
--- a/GeoLib/Polyline.h
+++ b/GeoLib/Polyline.h
@@ -72,9 +72,9 @@ public:
 
         LineSegment operator*();
 
-        bool operator==(SegmentIterator const& other);
+        bool operator==(SegmentIterator const& other) const;
 
-        bool operator!=(SegmentIterator const& other);
+        bool operator!=(SegmentIterator const& other) const;
 
         SegmentIterator& operator+=(std::vector<GeoLib::Point>::difference_type n);
 
-- 
GitLab