Fix TrxId_Interval comparison operators to be const for macOS compilation

fix/macos-build-deps
Rene Cannao 1 month ago
parent 6220ebf726
commit 520bd1be4e

@ -28,9 +28,9 @@ class TrxId_Interval {
const bool merge(const TrxId_Interval& other);
const int cmp(const TrxId_Interval& other);
const bool operator<(const TrxId_Interval& other);
const bool operator==(const TrxId_Interval& other);
const bool operator!=(const TrxId_Interval& other);
bool operator<(const TrxId_Interval& other) const;
bool operator==(const TrxId_Interval& other) const;
bool operator!=(const TrxId_Interval& other) const;
};
// Encapsulates a map of UUID -> trxid intervals.

@ -158,15 +158,15 @@ const int TrxId_Interval::cmp(const TrxId_Interval& other) {
return 0;
}
const bool TrxId_Interval::operator<(const TrxId_Interval& other) {
bool TrxId_Interval::operator<(const TrxId_Interval& other) const {
return cmp(other) == -1;
}
const bool TrxId_Interval::operator==(const TrxId_Interval& other) {
bool TrxId_Interval::operator==(const TrxId_Interval& other) const {
return cmp(other) == 0;
}
const bool TrxId_Interval::operator!=(const TrxId_Interval& other) {
bool TrxId_Interval::operator!=(const TrxId_Interval& other) const {
return cmp(other) != 0;
}

Loading…
Cancel
Save