Commit ed95ccb0 authored by Alexey Sokolov's avatar Alexey Sokolov Committed by Hugo Beauzée-Luyssen

Common.hpp: Use make_shared

parent 215a6a51
......@@ -146,7 +146,7 @@ namespace VLC
template <int NbEvents, typename Func>
static Wrapped* wrap(EventOwner<NbEvents>* owner, Func&& func)
{
owner->callbacks[Idx] = std::shared_ptr<CallbackHandlerBase>( new CallbackHandler<Func>( std::forward<Func>( func ) ) );
owner->callbacks[Idx] = std::make_shared<CallbackHandler<Func>>( std::forward<Func>( func ) );
return [](Opaque opaque, Args... args) -> Ret {
auto self = FromOpaque<NbEvents, Opaque>::get( opaque );
assert(self->callbacks[Idx].get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment