aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-06-13 13:17:57 +0100
committerfanquake <fanquake@gmail.com>2024-06-13 13:17:57 +0100
commita37778d4d32b4ddeff96f68a130dc8da3a84b278 (patch)
treecb176f0f0a9a93bcef89bdd70424cae01ad21629
parent1a463c70a368fb20316e03efac273438cf47baa3 (diff)
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
-rw-r--r--include/leveldb/status.h4
1 files changed, 4 insertions, 0 deletions
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;