From: Shinobu Kinjo Date: Wed, 13 Dec 2017 05:48:09 +0000 (+0900) Subject: common/mds/osd: Explicitly delete if no copy, and remove incorrect comment X-Git-Tag: v13.0.2~773^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19465%2Fhead;p=ceph.git common/mds/osd: Explicitly delete if no copy, and remove incorrect comment Signed-off-by: Shinobu Kinjo --- diff --git a/src/include/elist.h b/src/include/elist.h index 1bf3df8c6c87..6719b9c92d84 100644 --- a/src/include/elist.h +++ b/src/include/elist.h @@ -39,9 +39,8 @@ public: assert(!is_on_list()); } - // no copying! - item(const item& other); - const item& operator= (const item& right); + item(const item& other) = delete; + const item& operator= (const item& right) = delete; bool empty() const { return _prev == this; } diff --git a/src/include/xlist.h b/src/include/xlist.h index 3e39333e511d..5e4995af8300 100644 --- a/src/include/xlist.h +++ b/src/include/xlist.h @@ -33,9 +33,8 @@ public: //remove_myself(); } - // no copying! - item(const item& other); - const item& operator= (const item& right); + item(const item& other) = delete; + const item& operator= (const item& right) = delete; xlist* get_list() { return _list; } diff --git a/src/mds/Capability.h b/src/mds/Capability.h index e3ada8411c43..3543efee849f 100644 --- a/src/mds/Capability.h +++ b/src/mds/Capability.h @@ -127,9 +127,9 @@ public: mseq(0), suppress(0), state(0) { } - Capability(const Capability& other); // no copying + Capability(const Capability& other) = delete; - const Capability& operator=(const Capability& other); // no copying + const Capability& operator=(const Capability& other) = delete; int pending() { return _pending; } int issued() { return _issued; } diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index d817a632a017..fd1f381d90cf 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -587,7 +587,6 @@ private: memset(&fsid, 0, sizeof(fsid)); } - // no copying private: OSDMap(const OSDMap& other) = default; OSDMap& operator=(const OSDMap& other) = default; diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index de225dc865b4..701e642ecc8c 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -1754,9 +1754,8 @@ public: ping_tid(0), map_dne_bound(0) {} - // no copy! - const LingerOp &operator=(const LingerOp& r); - LingerOp(const LingerOp& o); + const LingerOp &operator=(const LingerOp& r) = delete; + LingerOp(const LingerOp& o) = delete; uint64_t get_cookie() { return reinterpret_cast(this);