Update leveldb-subtree subtree to latest upstream

This commit is contained in:
fanquake 2024-06-13 13:17:57 +01:00
commit 95812d912b
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -103,6 +103,8 @@ class LEVELDB_EXPORT Status {
inline Status::Status(const Status& rhs) { inline Status::Status(const Status& rhs) {
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_); state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
} }
// NOLINTBEGIN(bugprone-unhandled-self-assignment)
inline Status& Status::operator=(const Status& rhs) { inline Status& Status::operator=(const Status& rhs) {
// The following condition catches both aliasing (when this == &rhs), // The following condition catches both aliasing (when this == &rhs),
// and the common case where both rhs and *this are ok. // and the common case where both rhs and *this are ok.
@ -112,6 +114,8 @@ inline Status& Status::operator=(const Status& rhs) {
} }
return *this; return *this;
} }
// NOLINTEND(bugprone-unhandled-self-assignment)
inline Status& Status::operator=(Status&& rhs) noexcept { inline Status& Status::operator=(Status&& rhs) noexcept {
std::swap(state_, rhs.state_); std::swap(state_, rhs.state_);
return *this; return *this;