]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient.h: delete copy constr and assing op 10599/head
authorMichal Jarzabek <stiopa@gmail.com>
Fri, 5 Aug 2016 20:45:48 +0000 (21:45 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Fri, 5 Aug 2016 20:45:48 +0000 (21:45 +0100)
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 <stiopa@gmail.com>
src/mon/MonClient.h

index 2c7051bdb183f0e13c7d56f4242d44f6fb62c6d9..035b08db7c19e24b51f3c178cc79bca2f103ddc7 100644 (file)
@@ -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