diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index b2934ac..3bb1e15 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -74,7 +74,7 @@ struct ControlGetter auto operator()(World *w, FloatControlsIter &iter) { typename LongT::type bufnum = iter.next(); - return std::unique_ptr(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr); + return typename BufferT::type(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr); } }; @@ -130,7 +130,7 @@ struct ArgumentGetter auto operator()(World *w, sc_msg_iter *args) { typename LongT::type bufnum = args->geti(-1); - return std::unique_ptr(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr); + return typename BufferT::type(bufnum >= 0 ? new SCBufferAdaptor(bufnum, w) : nullptr); } };