mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-01 06:52:35 +02:00
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
This commit is contained in:
parent
1a463c70a3
commit
a37778d4d3
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user