math/sound-of-sorting: fix build on -CURRENT

This commit is contained in:
Stefan Eßer 2024-01-05 13:42:00 +01:00
parent 18c0f5348d
commit 31ec0266e3
2 changed files with 32 additions and 1 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= sound-of-sorting
PORTVERSION= 0.6.5
DISTVERSIONPREFIX= ${PORTNAME}-
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= math
MAINTAINER= se@FreeBSD.org

View File

@ -0,0 +1,31 @@
--- src/SortAlgo.h.orig 2017-12-23 08:39:32 UTC
+++ src/SortAlgo.h
@@ -164,22 +164,22 @@ class MyIterator : public std::iterator<std::random_ac
reference operator[](const difference_type& n) const
{ return m_array->get_mutable(m_pos + n); }
- bool operator==(const MyIterator& r)
+ bool operator==(const MyIterator& r) const
{ return (m_array == r.m_array) && (m_pos == r.m_pos); }
- bool operator!=(const MyIterator& r)
+ bool operator!=(const MyIterator& r) const
{ return (m_array != r.m_array) || (m_pos != r.m_pos); }
- bool operator<(const MyIterator& r)
+ bool operator<(const MyIterator& r) const
{ return (m_array == r.m_array ? (m_pos < r.m_pos) : (m_array < r.m_array)); }
- bool operator>(const MyIterator& r)
+ bool operator>(const MyIterator& r) const
{ return (m_array == r.m_array ? (m_pos > r.m_pos) : (m_array > r.m_array)); }
- bool operator<=(const MyIterator& r)
+ bool operator<=(const MyIterator& r) const
{ return (m_array == r.m_array ? (m_pos <= r.m_pos) : (m_array <= r.m_array)); }
- bool operator>=(const MyIterator& r)
+ bool operator>=(const MyIterator& r) const
{ return (m_array == r.m_array ? (m_pos >= r.m_pos) : (m_array >= r.m_array)); }
difference_type operator+(const MyIterator& r2) const