mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
src: remove unnecessary temporary creation
PR-URL: https://github.com/nodejs/node/pull/48734 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
c301404105
commit
ce73e887a3
@ -26,8 +26,8 @@ bool CleanupQueue::empty() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CleanupQueue::Add(Callback cb, void* arg) {
|
void CleanupQueue::Add(Callback cb, void* arg) {
|
||||||
auto insertion_info = cleanup_hooks_.emplace(
|
auto insertion_info =
|
||||||
CleanupHookCallback{cb, arg, cleanup_hook_counter_++});
|
cleanup_hooks_.emplace(cb, arg, cleanup_hook_counter_++);
|
||||||
// Make sure there was no existing element with these values.
|
// Make sure there was no existing element with these values.
|
||||||
CHECK_EQ(insertion_info.second, true);
|
CHECK_EQ(insertion_info.second, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user