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
main
anand76 3 years ago committed by Facebook GitHub Bot
parent 74ccd1931e
commit e58cc56fb5
  1. 6
      include/rocksdb/utilities/object_registry.h

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

Loading…
Cancel
Save