From 358273d77fd3109000900e5a36f73687cd0db172 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 16 Jul 2023 09:51:13 +0800 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca --- src/util.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/util.h b/src/util.h index 57a11c70a4c..d8fcfe19780 100644 --- a/src/util.h +++ b/src/util.h @@ -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: