Skip to content

Commit

Permalink
Update leveldb-subtree subtree to latest upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed Jun 13, 2024
2 parents 080a47c + a37778d commit 95812d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/leveldb/include/leveldb/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down

0 comments on commit 95812d9

Please sign in to comment.