From 6d44a48d612f969de8959ffcb24bf249b4855d22 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Sun, 17 Mar 2019 13:46:11 +0000 Subject: [PATCH] Use the proper type for buffer adaptor include/FluidSCWrapper.hpp --- include/FluidSCWrapper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } };