From a69d4ec500e9f4e5eae67e420d045ac76a1d354f Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 17 Aug 2018 14:13:56 -0700 Subject: [PATCH] messages: fix get_opname return type It cannot be a constexpr. Introduce-by: 00b867fae2e8e912119fc47348dee78631c6f66b / #23623 Signed-off-by: Patrick Donnelly --- src/messages/MMDSSlaveRequest.h | 2 +- src/messages/MMonPaxos.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messages/MMDSSlaveRequest.h b/src/messages/MMDSSlaveRequest.h index 97e7cfd07a95..2971a167a9a5 100644 --- a/src/messages/MMDSSlaveRequest.h +++ b/src/messages/MMDSSlaveRequest.h @@ -55,7 +55,7 @@ public: //static constexpr int OP_COMMIT = 21; // used for recovery only - static constexpr char *get_opname(int o) { + static const char *get_opname(int o) { switch (o) { case OP_XLOCK: return "xlock"; case OP_XLOCKACK: return "xlock_ack"; diff --git a/src/messages/MMonPaxos.h b/src/messages/MMonPaxos.h index 02d202dff0a3..a4d362fe6784 100644 --- a/src/messages/MMonPaxos.h +++ b/src/messages/MMonPaxos.h @@ -36,7 +36,7 @@ private: static constexpr int OP_COMMIT = 5; // proposer: notify learners of agreed value static constexpr int OP_LEASE = 6; // leader: extend peon lease static constexpr int OP_LEASE_ACK = 7; // peon: lease ack - const static char *get_opname(int op) { + static const char *get_opname(int op) { switch (op) { case OP_COLLECT: return "collect"; case OP_LAST: return "last"; -- 2.47.3