Fix some lint warnings reported on 6.25 (#8945)
Summary: Fix some lint warnings Pull Request resolved: https://github.com/facebook/rocksdb/pull/8945 Test Plan: existing tests, linters Reviewed By: zhichao-cao Differential Revision: D31103824 Pulled By: pdillinger fbshipit-source-id: 4dd9b0c30fa50e588107ac6ed392b2dfb507a5d4
This commit is contained in:
parent
b59b7570cf
commit
0774d640c0
@ -34,7 +34,7 @@ class Version;
|
||||
// the same as the inner DBIter.
|
||||
class ArenaWrappedDBIter : public Iterator {
|
||||
public:
|
||||
virtual ~ArenaWrappedDBIter() {
|
||||
~ArenaWrappedDBIter() override {
|
||||
if (db_iter_ != nullptr) {
|
||||
db_iter_->~DBIter();
|
||||
} else {
|
||||
|
@ -117,7 +117,7 @@ class ProtectionInfoKVO {
|
||||
friend class ProtectionInfoKVOS<T>;
|
||||
friend class ProtectionInfoKVOC<T>;
|
||||
|
||||
ProtectionInfoKVO<T>(T val) : info_(val) {
|
||||
explicit ProtectionInfoKVO<T>(T val) : info_(val) {
|
||||
static_assert(sizeof(ProtectionInfoKVO<T>) == sizeof(T), "");
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ class ProtectionInfoKVOC {
|
||||
private:
|
||||
friend class ProtectionInfoKVO<T>;
|
||||
|
||||
ProtectionInfoKVOC<T>(T val) : kvo_(val) {
|
||||
explicit ProtectionInfoKVOC<T>(T val) : kvo_(val) {
|
||||
static_assert(sizeof(ProtectionInfoKVOC<T>) == sizeof(T), "");
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ class ProtectionInfoKVOS {
|
||||
private:
|
||||
friend class ProtectionInfoKVO<T>;
|
||||
|
||||
ProtectionInfoKVOS<T>(T val) : kvo_(val) {
|
||||
explicit ProtectionInfoKVOS<T>(T val) : kvo_(val) {
|
||||
static_assert(sizeof(ProtectionInfoKVOS<T>) == sizeof(T), "");
|
||||
}
|
||||
|
||||
|
@ -1427,12 +1427,6 @@ TEST_F(EventListenerTest, BlobDBCompactFiles) {
|
||||
|
||||
class BlobDBFileLevelEventListener : public EventListener {
|
||||
public:
|
||||
BlobDBFileLevelEventListener() {
|
||||
files_started_.store(0);
|
||||
files_created_.store(0);
|
||||
files_deleted_.store(0);
|
||||
}
|
||||
|
||||
void OnBlobFileCreationStarted(
|
||||
const BlobFileCreationBriefInfo& info) override {
|
||||
files_started_++;
|
||||
@ -1471,9 +1465,9 @@ class BlobDBFileLevelEventListener : public EventListener {
|
||||
}
|
||||
|
||||
private:
|
||||
std::atomic<uint32_t> files_started_;
|
||||
std::atomic<uint32_t> files_created_;
|
||||
std::atomic<uint32_t> files_deleted_;
|
||||
std::atomic<uint32_t> files_started_{};
|
||||
std::atomic<uint32_t> files_created_{};
|
||||
std::atomic<uint32_t> files_deleted_{};
|
||||
};
|
||||
|
||||
TEST_F(EventListenerTest, BlobDBFileTest) {
|
||||
|
Loading…
Reference in New Issue
Block a user