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 Ceres6 committed Aug 14, 2023
1 parent eb17b76 commit f13f1bf
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 f13f1bf

Please sign in to comment.