Use == operator for shared_ptr nullptr comparison (#9465)

Summary:
From C++ 20 onwards, the != operator is not supported for a shared_ptr.
So switch to using ==.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9465

Test Plan: make check

Reviewed By: riversand963

Differential Revision: D33850596

Pulled By: anand1976

fbshipit-source-id: eec16d1aa6c39a315ec2d44d233d7518f9c1ddcb
This commit is contained in:
anand76 2022-01-28 12:47:42 -08:00
parent e8f116deab
commit d24dd13024

View File

@ -570,10 +570,10 @@ class ObjectRegistry {
} }
} }
} }
if (parent_ != nullptr) { if (parent_ == nullptr) {
return parent_->FindFactory<T>(name);
} else {
return nullptr; return nullptr;
} else {
return parent_->FindFactory<T>(name);
} }
} }