From 7d23761f07916626d6bcf73674ed518b6ec165e7 Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Fri, 5 Aug 2016 21:45:48 +0100 Subject: [PATCH] mon/MonClient.h: delete copy constr and assing op Declaring a copy constructor and assignment operator without an implementation will prevent copy and assignment, but it will be caught only during linking. Deleting them moves the checking to compile time. Signed-off-by: Michal Jarzabek --- src/mon/MonClient.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 2c7051bdb183..035b08db7c19 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -297,6 +297,8 @@ public: public: explicit MonClient(CephContext *cct_); + MonClient(const MonClient &) = delete; + MonClient& operator=(const MonClient &) = delete; ~MonClient(); int init(); @@ -459,8 +461,6 @@ private: void handle_get_version_reply(MMonGetVersionReply* m); - MonClient(const MonClient &rhs); - MonClient& operator=(const MonClient &rhs); }; #endif -- 2.47.3