From d759d4f6310320951d0351a948e6e7f2a88a097f Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 20 Jul 2023 17:20:15 +0800 Subject: [PATCH] src: remove unnecessary temporary creation PR-URL: https://github.com/nodejs/node/pull/48734 Reviewed-By: Chengzhong Wu Reviewed-By: Yagiz Nizipli --- src/cleanup_queue-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cleanup_queue-inl.h b/src/cleanup_queue-inl.h index d1fbd8241d9919..dad23ecf3aec24 100644 --- a/src/cleanup_queue-inl.h +++ b/src/cleanup_queue-inl.h @@ -26,8 +26,8 @@ bool CleanupQueue::empty() const { } void CleanupQueue::Add(Callback cb, void* arg) { - auto insertion_info = cleanup_hooks_.emplace( - CleanupHookCallback{cb, arg, cleanup_hook_counter_++}); + auto insertion_info = + cleanup_hooks_.emplace(cb, arg, cleanup_hook_counter_++); // Make sure there was no existing element with these values. CHECK_EQ(insertion_info.second, true); }