From d20869abb1219abd0a8fea0be26dc8894e849769 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 11 Mar 2019 19:08:03 +0800 Subject: [PATCH] osd/osd_types: remove copy ctor of osd_reqid_t 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`. as `object_info_t` contains an instance of `osd_reqid_t`. Signed-off-by: Kefu Chai --- src/osd/osd_types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 8dea9c96271a5..a4b7b08f6516f 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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) {} -- 2.39.5