Skip to content

Commit

Permalink
src: remove unnecessary temporary creation
Browse files Browse the repository at this point in the history
PR-URL: nodejs#48734
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
CGQAQ authored and pluris committed Aug 7, 2023
1 parent 9805d12 commit 0d900e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cleanup_queue-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0d900e0

Please sign in to comment.