]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
tools: add override
authorliuchang0812 <liuchang0812@gmail.com>
Wed, 22 Feb 2017 11:56:04 +0000 (19:56 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Fri, 3 Mar 2017 11:42:02 +0000 (19:42 +0800)
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
src/tools/cephfs/DataScan.h
src/tools/cephfs/MDSUtility.h
src/tools/rados/rados.cc
src/tools/rbd/action/Export.cc

index 6c482e63382e79906e60cce4cfddb4fb712a40ce..3133be282666cedd8b4c93fc37e98e4dbfe577f1 100644 (file)
@@ -119,19 +119,19 @@ class LocalFileDriver : public RecoveryDriver
     int init(
         librados::Rados &rados,
         const FSMap *fsmap,
-        fs_cluster_id_t fscid);
+        fs_cluster_id_t fscid) override;
 
     int inject_with_backtrace(
         const inode_backtrace_t &bt,
-        const InodeStore &dentry);
+        const InodeStore &dentry) override;
 
     int inject_lost_and_found(
         inodeno_t ino,
-        const InodeStore &dentry);
+        const InodeStore &dentry) override;
 
-    int init_roots(int64_t data_pool_id);
+    int init_roots(int64_t data_pool_id) override;
 
-    int check_roots(bool *result);
+    int check_roots(bool *result) override;
 };
 
 /**
@@ -212,7 +212,7 @@ class MetadataDriver : public RecoveryDriver, public MetadataTool
     int init(
         librados::Rados &rados,
         const FSMap *fsmap,
-        fs_cluster_id_t fscid);
+        fs_cluster_id_t fscid) override;
 
     int inject_linkage(
         inodeno_t dir_ino, const std::string &dname,
@@ -220,15 +220,15 @@ class MetadataDriver : public RecoveryDriver, public MetadataTool
 
     int inject_with_backtrace(
         const inode_backtrace_t &bt,
-        const InodeStore &dentry);
+        const InodeStore &dentry) override;
 
     int inject_lost_and_found(
         inodeno_t ino,
-        const InodeStore &dentry);
+        const InodeStore &dentry) override;
 
-    int init_roots(int64_t data_pool_id);
+    int init_roots(int64_t data_pool_id) override;
 
-    int check_roots(bool *result);
+    int check_roots(bool *result) override;
 };
 
 class DataScan : public MDSUtility, public MetadataTool
@@ -322,7 +322,7 @@ class DataScan : public MDSUtility, public MetadataTool
     {
     }
 
-    ~DataScan()
+    ~DataScan() override
     {
       delete driver;
     }
index 7547c0e78c6b09e6b9f6b77521d0267c99aa0758..f6d2fe4cedb577fee401db14871942c3c2fc4879 100644 (file)
@@ -44,15 +44,15 @@ protected:
 
 public:
   MDSUtility();
-  ~MDSUtility();
+  ~MDSUtility() override;
 
   void handle_fs_map(MFSMap* m);
-  bool ms_dispatch(Message *m);
-  bool ms_handle_reset(Connection *con) { return false; }
-  void ms_handle_remote_reset(Connection *con) {}
-  bool ms_handle_refused(Connection *con) { return false; }
+  bool ms_dispatch(Message *m) override;
+  bool ms_handle_reset(Connection *con) override { return false; }
+  void ms_handle_remote_reset(Connection *con) override {}
+  bool ms_handle_refused(Connection *con) override { return false; }
   bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer,
-                         bool force_new);
+                         bool force_new) override;
   int init();
   void shutdown();
 };
index 4c1c474b91ea19188805f1a1fb9d0bbe0fa43c86..61902f321d026d70fc41625f82219fdd1d9728f6 100644 (file)
@@ -490,7 +490,7 @@ class RadosWatchCtx : public librados::WatchCtx2 {
   string name;
 public:
   RadosWatchCtx(IoCtx& io, const char *imgname) : ioctx(io), name(imgname) {}
-  ~RadosWatchCtx() {}
+  ~RadosWatchCtx() override {}
   void handle_notify(uint64_t notify_id,
                     uint64_t cookie,
                     uint64_t notifier_id,
@@ -996,7 +996,7 @@ protected:
 public:
   RadosBencher(CephContext *cct_, librados::Rados& _r, librados::IoCtx& _i)
     : ObjBencher(cct_), completions(NULL), rados(_r), io_ctx(_i), iterator_valid(false), write_destination(OP_WRITE_DEST_OBJ) {}
-  ~RadosBencher() { }
+  ~RadosBencher() override { }
 
   void set_write_destination(OpWriteDest dest) {
     write_destination = dest;
index eae06aeb51fcbd07513779a8d0d540f8e2446388..e41920819b64c8ba0a38ab8b536b99c63cbb879a 100644 (file)
@@ -74,7 +74,7 @@ public:
   }
 
 protected:
-  virtual void finish(int r) {
+  void finish(int r) override {
     if (r >= 0) {
       if (m_exists) {
         m_exists = !m_read_data.is_zero();