Skip to content

Commit 520bd1b

Browse files
committed
Fix TrxId_Interval comparison operators to be const for macOS compilation
1 parent 6220ebf commit 520bd1b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

include/proxysql_gtid.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class TrxId_Interval {
2828
const bool merge(const TrxId_Interval& other);
2929

3030
const int cmp(const TrxId_Interval& other);
31-
const bool operator<(const TrxId_Interval& other);
32-
const bool operator==(const TrxId_Interval& other);
33-
const bool operator!=(const TrxId_Interval& other);
31+
bool operator<(const TrxId_Interval& other) const;
32+
bool operator==(const TrxId_Interval& other) const;
33+
bool operator!=(const TrxId_Interval& other) const;
3434
};
3535

3636
// Encapsulates a map of UUID -> trxid intervals.

lib/proxysql_gtid.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ const int TrxId_Interval::cmp(const TrxId_Interval& other) {
158158
return 0;
159159
}
160160

161-
const bool TrxId_Interval::operator<(const TrxId_Interval& other) {
161+
bool TrxId_Interval::operator<(const TrxId_Interval& other) const {
162162
return cmp(other) == -1;
163163
}
164164

165-
const bool TrxId_Interval::operator==(const TrxId_Interval& other) {
165+
bool TrxId_Interval::operator==(const TrxId_Interval& other) const {
166166
return cmp(other) == 0;
167167
}
168168

169-
const bool TrxId_Interval::operator!=(const TrxId_Interval& other) {
169+
bool TrxId_Interval::operator!=(const TrxId_Interval& other) const {
170170
return cmp(other) != 0;
171171
}
172172

0 commit comments

Comments
 (0)