Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: fix format
  • Loading branch information
CGQAQ committed Jul 12, 2023
commit e9955e9563913c1f266a06d6a598966fd93782f5
4 changes: 2 additions & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ struct OnScopeLeaveImpl {
}
OnScopeLeaveImpl& operator=(OnScopeLeaveImpl&& other) {
if (this == &other) return *this;
if (active_) fn_(); // Invoke the function for the current instance
fn_ = std::move(other.fn_); // Move assign the function from the other instance
if (active_) fn_();
fn_ = std::move(other.fn_);
active_ = other.active_;
other.active_ = false;
return *this;
Expand Down