From 8cc4c461d6902539e12bf6a3e9597813b400fa1e Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:09:08 +0800 Subject: [PATCH] Fix compile with libc++ 18 (#3680) --- src/Operation.cpp | 2 +- src/Operation.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Operation.cpp b/src/Operation.cpp index 4bc4ecc48..20796803b 100644 --- a/src/Operation.cpp +++ b/src/Operation.cpp @@ -47,7 +47,7 @@ Operation& Operation::operator=(const Operation& other) { } //////////////////////////////////////////////////////////////////////////////// -bool Operation::operator<(Operation& other) const { +bool Operation::operator<(const Operation& other) const { if (is_create()) { return !other.is_create(); } else if (is_update()) { diff --git a/src/Operation.h b/src/Operation.h index 707dffd89..485b422bd 100644 --- a/src/Operation.h +++ b/src/Operation.h @@ -78,7 +78,7 @@ class Operation { // Define a partial order on Operations: // - Create < Update < Delete < UndoPoint // - Given two updates, sort by timestamp - bool operator<(Operation &other) const; + bool operator<(const Operation &other) const; private: const tc::Operation *op;