]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: remove copy ctor of osd_reqid_t 27003/head
authorKefu Chai <kchai@redhat.com>
Mon, 11 Mar 2019 11:08:03 +0000 (19:08 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Mar 2019 06:24:35 +0000 (14:24 +0800)
do not define the copy constructor of osd_reqid_t explicitly. compiler
will define a default one for us. the implicitly defined one will call
the copy constructor of each member variable. so it is as good as the
user-defined one.

another reason to remove this copy ctor is that, it prevents the
compiler from defining a default move constructor, without which, we
cannot return `future<object_info_t>`. as `object_info_t` contains an
instance of `osd_reqid_t`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/osd_types.h

index 8dea9c96271a5b0d55acaab39c616577f8dfe51e..a4b7b08f6516f695b7d8227e9a4beafaa4a09517 100644 (file)
@@ -133,9 +133,6 @@ struct osd_reqid_t {
   osd_reqid_t()
     : tid(0), inc(0)
   {}
-  osd_reqid_t(const osd_reqid_t& other)
-    : name(other.name), tid(other.tid), inc(other.inc)
-  {}
   osd_reqid_t(const entity_name_t& a, int i, ceph_tid_t t)
     : name(a), tid(t), inc(i)
   {}