Use the proper type for buffer adaptor

include/FluidSCWrapper.hpp
nix
Owen Green 7 years ago
parent 2a22d7d0e7
commit 6d44a48d61

@ -74,7 +74,7 @@ struct ControlGetter<N, BufferT>
auto operator()(World *w, FloatControlsIter &iter)
{
typename LongT::type bufnum = iter.next();
return std::unique_ptr<BufferAdaptor>(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr);
return typename BufferT::type(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr);
}
};
@ -130,7 +130,7 @@ struct ArgumentGetter<N, BufferT>
auto operator()(World *w, sc_msg_iter *args)
{
typename LongT::type bufnum = args->geti(-1);
return std::unique_ptr<BufferAdaptor>(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr);
return typename BufferT::type(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr);
}
};

Loading…
Cancel
Save