]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Apply CLANG Tidy v5.5.1
authorsdong <siying.d@fb.com>
Tue, 27 Jun 2017 00:47:20 +0000 (17:47 -0700)
committersdong <siying.d@fb.com>
Tue, 27 Jun 2017 00:47:20 +0000 (17:47 -0700)
include/rocksdb/env.h
include/rocksdb/flush_block_policy.h
include/rocksdb/merge_operator.h
include/rocksdb/utilities/sim_cache.h
include/rocksdb/utilities/transaction_db.h
include/rocksdb/utilities/write_batch_with_index.h
include/rocksdb/write_batch.h

index 670a7e5465a07016f8a5e3cfeb96fe0efc303a5a..da9f51c5f48b6621c2d5248ef05fdc911de67481 100644 (file)
@@ -900,7 +900,7 @@ class EnvWrapper : public Env {
  public:
   // Initialize an EnvWrapper that delegates all calls to *t
   explicit EnvWrapper(Env* t) : target_(t) { }
-  virtual ~EnvWrapper();
+  ~EnvWrapper() override;
 
   // Return the target to which this Env forwards all calls
   Env* target() const { return target_; }
@@ -935,8 +935,8 @@ class EnvWrapper : public Env {
                          const EnvOptions& options) override {
     return target_->NewRandomRWFile(fname, result, options);
   }
-  virtual Status NewDirectory(const std::string& name,
-                              unique_ptr<Directory>* result) override {
+  Status NewDirectory(const std::string& name, unique_ptr<Directory>* result)
+      override {
     return target_->NewDirectory(name, result);
   }
   Status FileExists(const std::string& f) override {
@@ -998,15 +998,14 @@ class EnvWrapper : public Env {
     return target_->StartThread(f, a);
   }
   void WaitForJoin() override { return target_->WaitForJoin(); }
-  virtual unsigned int GetThreadPoolQueueLen(
-      Priority pri = LOW) const override {
+  unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const override {
     return target_->GetThreadPoolQueueLen(pri);
   }
-  virtual Status GetTestDirectory(std::string* path) override {
+  Status GetTestDirectory(std::string* path) override {
     return target_->GetTestDirectory(path);
   }
-  virtual Status NewLogger(const std::string& fname,
-                           shared_ptr<Logger>* result) override {
+  Status NewLogger(const std::string& fname, shared_ptr<Logger>* result)
+      override {
     return target_->NewLogger(fname, result);
   }
   uint64_t NowMicros() override { return target_->NowMicros(); }
@@ -1091,10 +1090,10 @@ class WritableFileWrapper : public WritableFile {
     return target_->InvalidateCache(offset, length);
   }
 
-  virtual void SetPreallocationBlockSize(size_t size) override {
+  void SetPreallocationBlockSize(size_t size) override {
     target_->SetPreallocationBlockSize(size);
   }
-  virtual void PrepareWrite(size_t offset, size_t len) override {
+  void PrepareWrite(size_t offset, size_t len) override {
     target_->PrepareWrite(offset, len);
   }
 
index 7655901716e90933656f4ab319384434e80f3672..1dff13b31f2f2fe812befb49d2ee32edf0cc6ba1 100644 (file)
@@ -48,11 +48,11 @@ class FlushBlockBySizePolicyFactory : public FlushBlockPolicyFactory {
  public:
   FlushBlockBySizePolicyFactory() {}
 
-  virtual const char* Name() const override {
+  const char* Name() const override {
     return "FlushBlockBySizePolicyFactory";
   }
 
-  virtual FlushBlockPolicy* NewFlushBlockPolicy(
+  FlushBlockPolicy* NewFlushBlockPolicy(
       const BlockBasedTableOptions& table_options,
       const BlockBuilder& data_block_builder) const override;
 
index 6ec34fe3e45354944657933e104f2dbc23ad520b..eb76143c70592302c5b78e7e9999936dc61d5c9a 100644 (file)
@@ -188,7 +188,7 @@ class MergeOperator {
 // The simpler, associative merge operator.
 class AssociativeMergeOperator : public MergeOperator {
  public:
-  virtual ~AssociativeMergeOperator() {}
+  ~AssociativeMergeOperator() override {}
 
   // Gives the client a way to express the read -> modify -> write semantics
   // key:           (IN) The key that's associated with this merge operation.
@@ -212,14 +212,16 @@ class AssociativeMergeOperator : public MergeOperator {
 
  private:
   // Default implementations of the MergeOperator functions
-  virtual bool FullMergeV2(const MergeOperationInput& merge_in,
-                           MergeOperationOutput* merge_out) const override;
-
-  virtual bool PartialMerge(const Slice& key,
-                            const Slice& left_operand,
-                            const Slice& right_operand,
-                            std::string* new_value,
-                            Logger* logger) const override;
+  bool FullMergeV2(
+      const MergeOperationInput& merge_in,
+      MergeOperationOutput* merge_out) const override;
+
+  bool PartialMerge(
+      const Slice& key,
+      const Slice& left_operand,
+      const Slice& right_operand,
+      std::string* new_value,
+      Logger* logger) const override;
 };
 
 }  // namespace rocksdb
index 64cb643ce40fc89a2554974420fc6e00a34dc59f..a7de089772dc371e395398ceb7d7dedd3636406f 100644 (file)
@@ -39,9 +39,11 @@ class SimCache : public Cache {
  public:
   SimCache() {}
 
-  virtual ~SimCache() {}
+  ~SimCache() override {}
 
-  virtual const char* Name() const override { return "SimCache"; }
+  const char* Name() const override {
+    return "SimCache";
+  }
 
   // returns the maximum configured capacity of the simcache for simulation
   virtual size_t GetSimCapacity() const = 0;
index ec97438928fe8fe5c207c0034c3c0b454f5c9996..e14f9e06db10c2255cadad417371309d6bc3a53f 100644 (file)
@@ -148,7 +148,7 @@ class TransactionDB : public StackableDB {
       StackableDB* db, const TransactionDBOptions& txn_db_options,
       const std::vector<size_t>& compaction_enabled_cf_indices,
       const std::vector<ColumnFamilyHandle*>& handles, TransactionDB** dbptr);
-  virtual ~TransactionDB() {}
+  ~TransactionDB() override {}
 
   // Starts a new Transaction.
   //
index ba6d670575e860d5fb54e8ab85c7ae77a710743a..f429610c4144172f044663ad2b41e8b3fc5a9b9d 100644 (file)
@@ -97,7 +97,7 @@ class WriteBatchWithIndex : public WriteBatchBase {
       size_t reserved_bytes = 0, bool overwrite_key = false,
       size_t max_bytes = 0);
 
-  virtual ~WriteBatchWithIndex();
+  ~WriteBatchWithIndex() override;
 
   using WriteBatchBase::Put;
   Status Put(ColumnFamilyHandle* column_family, const Slice& key,
index d98c56261c7a8f17d5f0ba2098b7d688451eb872..432a7c19bbb143b928f978cd5ad04233f63a4f4a 100644 (file)
@@ -61,7 +61,7 @@ struct SavePoint {
 class WriteBatch : public WriteBatchBase {
  public:
   explicit WriteBatch(size_t reserved_bytes = 0, size_t max_bytes = 0);
-  ~WriteBatch();
+  ~WriteBatch() override;
 
   using WriteBatchBase::Put;
   // Store the mapping "key->value" in the database.