diff --git a/db/db_test_util.h b/db/db_test_util.h index 4b5bc48450d..f58b18e4ac0 100644 --- a/db/db_test_util.h +++ b/db/db_test_util.h @@ -282,7 +282,9 @@ class SpecialEnv : public EnvWrapper { : env_(env), base_(std::move(b)) { env_->num_open_wal_file_.fetch_add(1); } - virtual ~SpecialWalFile() { env_->num_open_wal_file_.fetch_add(-1); } + virtual ~SpecialWalFile() override { + env_->num_open_wal_file_.fetch_add(-1); + } Status Append(const Slice& data) override { #if !(defined NDEBUG) || !defined(OS_WIN) TEST_SYNC_POINT("SpecialEnv::SpecialWalFile::Append:1"); @@ -594,7 +596,7 @@ class SpecialEnv : public EnvWrapper { class NoopDirectory : public Directory { public: NoopDirectory() {} - ~NoopDirectory() {} + ~NoopDirectory() override {} Status Fsync() override { return Status::OK(); } Status Close() override { return Status::OK(); } @@ -1098,7 +1100,7 @@ class DBTestBase : public testing::Test { // tests, but won't cover the exact fsync logic. DBTestBase(const std::string path, bool env_do_fsync); - ~DBTestBase(); + ~DBTestBase() override; static std::string Key(int i) { char buf[100]; diff --git a/table/mock_table.h b/table/mock_table.h index af3a4eb46cd..ccab4afec3a 100644 --- a/table/mock_table.h +++ b/table/mock_table.h @@ -135,7 +135,7 @@ class MockTableReader : public TableReader { return std::make_shared(tp_); } - ~MockTableReader() = default; + ~MockTableReader() override = default; private: const KVVector& table_; diff --git a/test_util/testutil.h b/test_util/testutil.h index 2d693b5f201..88420ca67fe 100644 --- a/test_util/testutil.h +++ b/test_util/testutil.h @@ -84,7 +84,7 @@ class PlainInternalKeyComparator : public InternalKeyComparator { explicit PlainInternalKeyComparator(const Comparator* c) : InternalKeyComparator(c) {} - virtual ~PlainInternalKeyComparator() {} + virtual ~PlainInternalKeyComparator() override {} int Compare(const Slice& a, const Slice& b) const override { return user_comparator()->Compare(a, b); @@ -310,7 +310,7 @@ class StringSource : public FSRandomAccessFile { mmap_(mmap), total_reads_(0) {} - virtual ~StringSource() {} + virtual ~StringSource() override {} uint64_t Size() const { return contents_.size(); } @@ -744,7 +744,7 @@ class ChanglingMergeOperator : public MergeOperator { public: explicit ChanglingMergeOperator(const std::string& name) : name_(name + "MergeOperator") {} - ~ChanglingMergeOperator() {} + ~ChanglingMergeOperator() override {} void SetName(const std::string& name) { name_ = name; } @@ -783,7 +783,7 @@ class ChanglingCompactionFilter : public CompactionFilter { public: explicit ChanglingCompactionFilter(const std::string& name) : name_(name + "CompactionFilter") {} - ~ChanglingCompactionFilter() {} + ~ChanglingCompactionFilter() override {} void SetName(const std::string& name) { name_ = name; } @@ -819,7 +819,7 @@ class ChanglingCompactionFilterFactory : public CompactionFilterFactory { public: explicit ChanglingCompactionFilterFactory(const std::string& name) : name_(name + "CompactionFilterFactory") {} - ~ChanglingCompactionFilterFactory() {} + ~ChanglingCompactionFilterFactory() override {} void SetName(const std::string& name) { name_ = name; }