From fa7041126de806d463216df55442434c2c6e20b6 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 23 Oct 2018 17:27:51 -0400 Subject: [PATCH] rgw: rgw_rados_ref uses default copy/move Signed-off-by: Casey Bodley --- src/rgw/services/svc_rados.cc | 1 - src/rgw/services/svc_rados.h | 44 ----------------------------------- 2 files changed, 45 deletions(-) diff --git a/src/rgw/services/svc_rados.cc b/src/rgw/services/svc_rados.cc index 5c61dcdbc0d..bb486182aac 100644 --- a/src/rgw/services/svc_rados.cc +++ b/src/rgw/services/svc_rados.cc @@ -146,7 +146,6 @@ int RGWSI_RADOS::Obj::open() return r; } - ref.has_ioctx = true; ref.ioctx.locator_set_key(ref.key); return 0; diff --git a/src/rgw/services/svc_rados.h b/src/rgw/services/svc_rados.h index 4d79c9ea6da..b6b46aa1f86 100644 --- a/src/rgw/services/svc_rados.h +++ b/src/rgw/services/svc_rados.h @@ -25,51 +25,7 @@ struct rgw_rados_ref { rgw_pool pool; string oid; string key; - bool has_ioctx{false}; librados::IoCtx ioctx; - - rgw_rados_ref() {} - ~rgw_rados_ref() {} - - rgw_rados_ref(const rgw_rados_ref& r) : pool(r.pool), - oid(r.oid), - key(r.key), - has_ioctx(r.has_ioctx) { - if (r.has_ioctx) { - ioctx = r.ioctx; - } - } - - rgw_rados_ref(const rgw_rados_ref&& r) : pool(std::move(r.pool)), - oid(std::move(r.oid)), - key(std::move(r.key)), - has_ioctx(r.has_ioctx) { - if (r.has_ioctx) { - ioctx = r.ioctx; - } - } - - rgw_rados_ref& operator=(rgw_rados_ref&& r) { - pool = std::move(r.pool); - oid = std::move(r.oid); - key = std::move(r.key); - has_ioctx = r.has_ioctx; - if (has_ioctx) { - ioctx = r.ioctx; - } - return *this; - } - - rgw_rados_ref& operator=(rgw_rados_ref& r) { - pool = r.pool; - oid = r.oid; - key = r.key; - has_ioctx = r.has_ioctx; - if (has_ioctx) { - ioctx = r.ioctx; - } - return *this; - } }; class RGWSI_RADOS : public RGWServiceInstance -- 2.39.5