Set params at client creation time to ensure that everything we expect happens in the client constructor

include/FluidSCWrapper.hpp
nix
Owen Green 7 years ago
parent 29386e71b2
commit fa56f06fdb

@ -167,9 +167,9 @@ class NonRealTime
public: public:
static void setup(InterfaceTable *ft, const char *name) { DefinePlugInCmd(name, launch, nullptr); } static void setup(InterfaceTable *ft, const char *name) { DefinePlugInCmd(name, launch, nullptr); }
NonRealTime(World*, sc_msg_iter*) NonRealTime(World* w, sc_msg_iter* args)
: mParams{Client::getParameterDescriptors()} : mParams{Client::getParameterDescriptors()}
, mClient{mParams} , mClient{Wrapper::setParams(mParams, false, w, args)}
{} {}
void init(){}; void init(){};
@ -188,8 +188,6 @@ public:
Wrapper *w = new Wrapper( Wrapper *w = new Wrapper(
world, args); // this has to be on the heap, because it doesn't get destroyed until the async command is done world, args); // this has to be on the heap, because it doesn't get destroyed until the async command is done
Wrapper::setParams(w->mParams, false, world, args);
Result result = validateParameters(w); Result result = validateParameters(w);
if (!result.ok()) if (!result.ok())
{ {

Loading…
Cancel
Save