Skip to content

Commit

Permalink
src: remove unnecessary temporary creation
Browse files Browse the repository at this point in the history
PR-URL: #48734
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
CGQAQ authored Jul 20, 2023
1 parent c301404 commit ce73e88
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 ce73e88

Please sign in to comment.