From a37778d4d32b4ddeff96f68a130dc8da3a84b278 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 13 Jun 2024 13:17:57 +0100 Subject: [PATCH] Squashed 'src/leveldb/' changes from e2f10b4e47..688561cba8 688561cba8 Merge bitcoin-core/leveldb-subtree#41: Ignore clang's self-assignment check 7045a90ed7 Ignore clang's self-assignment check git-subtree-dir: src/leveldb git-subtree-split: 688561cba8746482893f835c4829e4eb4a5b7615 --- include/leveldb/status.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/leveldb/status.h b/include/leveldb/status.h index e3273144e4..68efe3001a 100644 --- a/include/leveldb/status.h +++ b/include/leveldb/status.h @@ -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;