]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: use operator=(...) instead of claim() 35935/head
authorKefu Chai <kchai@redhat.com>
Sun, 5 Jul 2020 13:48:19 +0000 (21:48 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 5 Jul 2020 13:48:20 +0000 (21:48 +0800)
to silence warnings like

objclass.cc:300:26: warning: 'void ceph::buffer::v15_2_0::list::claim(ceph::buffer::v15_2_0::list&)' is deprecated: in favor of operator=(list&&) [-Wdeprecated-declarations]
  300 |   outbl->claim(op.outdata);
      |                          ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/objclass.cc

index a26e07780defe0c34ab088c500e0b60f3d22af64..a627f8524ccdb237d18742afc51032436c7258d8 100644 (file)
@@ -297,7 +297,7 @@ int cls_cxx_map_read_header(cls_method_context_t hctx, bufferlist *outbl)
   if (const auto ret = execute_osd_op(hctx, op); ret < 0) {
     return ret;
   }
-  outbl->claim(op.outdata);
+  outbl = std::move(op.outdata);
   return 0;
 }
 
@@ -357,7 +357,7 @@ int cls_cxx_map_clear(cls_method_context_t hctx)
 int cls_cxx_map_write_header(cls_method_context_t hctx, bufferlist *inbl)
 {
   OSDOp op{CEPH_OSD_OP_OMAPSETHEADER};
-  op.indata.claim(*inbl);
+  op.indata = std::move(*inbl);
   return execute_osd_op(hctx, op);
 }