]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: fix get_opname return type 23636/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 17 Aug 2018 21:13:56 +0000 (14:13 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 17 Aug 2018 21:15:18 +0000 (14:15 -0700)
It cannot be a constexpr.

Introduce-by: 00b867fae2e8e912119fc47348dee78631c6f66b / #23623
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/messages/MMDSSlaveRequest.h
src/messages/MMonPaxos.h

index 97e7cfd07a95764bebf0a2c75102675c53ee83c6..2971a167a9a516cbf8c152d0dce29bad2432ceb8 100644 (file)
@@ -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";
index 02d202dff0a30c5c9ed20a641700229f2d204213..a4d362fe6784a78ab527c5e5e34b189484a6bacb 100644 (file)
@@ -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";