Skip to content

Commit

Permalink
Don't use std::make_unique right before release
Browse files Browse the repository at this point in the history
  • Loading branch information
tfc committed Jan 5, 2024
1 parent 659bcf6 commit 060393c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libutil/signals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ std::unique_ptr<InterruptCallback> createInterruptCallback(std::function<void()>
auto token = interruptCallbacks->nextToken++;
interruptCallbacks->callbacks.emplace(token, callback);

auto res = std::make_unique<InterruptCallbackImpl>();
std::unique_ptr<InterruptCallbackImpl> res {new InterruptCallbackImpl{}};
res->token = token;

return std::unique_ptr<InterruptCallback>(res.release());
Expand Down

0 comments on commit 060393c

Please sign in to comment.