From 520bd1be4ec9116691b8f443806140ca962e1f83 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Fri, 24 Apr 2026 05:33:26 +0000 Subject: [PATCH] Fix TrxId_Interval comparison operators to be const for macOS compilation --- include/proxysql_gtid.h | 6 +++--- lib/proxysql_gtid.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/proxysql_gtid.h b/include/proxysql_gtid.h index 44d480e08..68931c057 100644 --- a/include/proxysql_gtid.h +++ b/include/proxysql_gtid.h @@ -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. diff --git a/lib/proxysql_gtid.cpp b/lib/proxysql_gtid.cpp index 0f3b423de..d63eeba7d 100644 --- a/lib/proxysql_gtid.cpp +++ b/lib/proxysql_gtid.cpp @@ -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; }