From 07d0fd61b176dba675cfd1280ec9113fbe91724a 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 b0e4d3d7820c1a..c2ae527d6f5123 100644 --- a/src/util.h +++ b/src/util.h @@ -577,12 +577,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: