Merge bitcoin/bitcoin#30281: Update leveldb subtree to latest upstream

a37778d4d3 Squashed 'src/leveldb/' changes from e2f10b4e47..688561cba8 (fanquake)

Pull request description:

  Includes https://github.com/bitcoin-core/leveldb-subtree/pull/41 which is used in #30234.

ACKs for top commit:
  theuni:
    utACK 95812d912b

Tree-SHA512: 3d943695a3d33816cf5558b183f5629aa92a500a1544eecedf84952e93c8592a8cf0d554b88281fc0bad3c9e920ebcff1ed8edc12f8e73f36ed5335482beb829
This commit is contained in:
merge-script 2024-06-14 11:26:02 +01:00
commit 0b94fb8720
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) {
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
}
// NOLINTBEGIN(bugprone-unhandled-self-assignment)
inline Status& Status::operator=(const Status& rhs) {
// The following condition catches both aliasing (when this == &rhs),
// and the common case where both rhs and *this are ok.
@ -112,6 +114,8 @@ inline Status& Status::operator=(const Status& rhs) {
}
return *this;
}
// NOLINTEND(bugprone-unhandled-self-assignment)
inline Status& Status::operator=(Status&& rhs) noexcept {
std::swap(state_, rhs.state_);
return *this;