Skip to content

Commit

Permalink
src: remove OnScopeLeaveImpl's move assignment overload
Browse files Browse the repository at this point in the history
... as it's not valid implementation and also has not been used

PR-URL: #48732
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
CGQAQ authored and targos committed Nov 26, 2023
1 parent e455dd4 commit 358273d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,12 +568,6 @@ struct OnScopeLeaveImpl {
: fn_(std::move(other.fn_)), active_(other.active_) {
other.active_ = false;
}
OnScopeLeaveImpl& operator=(OnScopeLeaveImpl&& other) {
if (this == &other) return *this;
this->~OnScopeLeave();
new (this)OnScopeLeaveImpl(std::move(other));
return *this;
}
};

// Run a function when exiting the current scope. Used like this:
Expand Down

0 comments on commit 358273d

Please sign in to comment.