mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: remove OnScopeLeaveImpl's move assignment overload
... as it's not valid implementation and also has not been used PR-URL: https://github.com/nodejs/node/pull/48732 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
e455dd4003
commit
358273d77f
1 file changed
-6
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user