Skip to content
Snippets Groups Projects
Commit f5f11d4a authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[GL] Add missing const to SegmentIterator::op==().

gcc-8.3 complains otherwise about the comparison
operator being missing for two constant SegmentIterators.
parent 0c88cedf
No related branches found
No related tags found
No related merge requests found
...@@ -524,12 +524,12 @@ LineSegment Polyline::SegmentIterator::operator*() ...@@ -524,12 +524,12 @@ LineSegment Polyline::SegmentIterator::operator*()
return _polyline->getSegment(_segment_number); return _polyline->getSegment(_segment_number);
} }
bool Polyline::SegmentIterator::operator==(SegmentIterator const& other) bool Polyline::SegmentIterator::operator==(SegmentIterator const& other) const
{ {
return !(*this != other); return !(*this != other);
} }
bool Polyline::SegmentIterator::operator!=(SegmentIterator const& other) bool Polyline::SegmentIterator::operator!=(SegmentIterator const& other) const
{ {
return other._segment_number != _segment_number || return other._segment_number != _segment_number ||
other._polyline != _polyline; other._polyline != _polyline;
......
...@@ -72,9 +72,9 @@ public: ...@@ -72,9 +72,9 @@ public:
LineSegment operator*(); 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); SegmentIterator& operator+=(std::vector<GeoLib::Point>::difference_type n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment