From: Patrick Donnelly Date: Fri, 17 Aug 2018 21:13:56 +0000 (-0700) Subject: messages: fix get_opname return type X-Git-Tag: v14.0.1~565^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a69d4ec500e9f4e5eae67e420d045ac76a1d354f;p=ceph.git messages: fix get_opname return type It cannot be a constexpr. Introduce-by: 00b867fae2e8e912119fc47348dee78631c6f66b / #23623 Signed-off-by: Patrick Donnelly --- diff --git a/src/messages/MMDSSlaveRequest.h b/src/messages/MMDSSlaveRequest.h index 97e7cfd07a957..2971a167a9a51 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 02d202dff0a30..a4d362fe6784a 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";