Skip to content

Commit

Permalink
Mark destructors as overridden (#12324)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #12324

We are trying to use rocksdb inside Hedwig. This is causing some builds to fail D53033764. Hence fixing -Wsuggest-destructor-override warning.

Reviewed By: jowlyzhang

Differential Revision: D53328538

fbshipit-source-id: d5b9865442de049b18f9ed086df5fa58fb8880d5
  • Loading branch information
Sanket Sanjeev Karnik authored and facebook-github-bot committed Feb 2, 2024
1 parent c6b1f6d commit 046ac91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/rocksdb/utilities/optimistic_transaction_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class OptimisticTransactionDB : public StackableDB {
std::vector<ColumnFamilyHandle*>* handles,
OptimisticTransactionDB** dbptr);

virtual ~OptimisticTransactionDB() {}
~OptimisticTransactionDB() override {}

// Starts a new Transaction.
//
Expand Down
2 changes: 1 addition & 1 deletion include/rocksdb/utilities/stackable_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class StackableDB : public DB {
explicit StackableDB(std::shared_ptr<DB> db)
: db_(db.get()), shared_db_ptr_(db) {}

~StackableDB() {
~StackableDB() override {
if (shared_db_ptr_ == nullptr) {
delete db_;
} else {
Expand Down
3 changes: 1 addition & 2 deletions include/rocksdb/utilities/transaction_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class RangeLockManagerHandle : public LockManagerHandle {
virtual std::vector<RangeDeadlockPath> GetRangeDeadlockInfoBuffer() = 0;
virtual void SetRangeDeadlockInfoBufferSize(uint32_t target_size) = 0;

virtual ~RangeLockManagerHandle() {}
~RangeLockManagerHandle() override {}
};

// A factory function to create a Range Lock Manager. The created object should
Expand Down Expand Up @@ -503,4 +503,3 @@ class TransactionDB : public StackableDB {
};

} // namespace ROCKSDB_NAMESPACE

2 changes: 1 addition & 1 deletion utilities/blob_db/blob_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class BlobDB : public StackableDB {

virtual Status SyncBlobFiles(const WriteOptions& write_options) = 0;

virtual ~BlobDB() {}
~BlobDB() override {}

protected:
explicit BlobDB();
Expand Down

0 comments on commit 046ac91

Please sign in to comment.