Don't use std::make_unique right before release

This commit is contained in:
Jacek Galowicz 2023-11-02 15:52:53 +01:00
parent 9d9f42cc38
commit 8ae3aeec94
1 changed files with 1 additions and 1 deletions

View File

@ -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());