Hi! I’m trying to build computerscare modules for v2, I’ve run into this error upon running make:
../../include/engine/Module.hpp:122:15: error: assigning to 'ComputerscareMenuParamModule *' from incompatible type 'rack::engine::Module *'
q->module = this;
^~~~
src/MenuParams.hpp:183:3: note: in instantiation of function template specialization
'rack::engine::Module::configParam<MultiselectParamQuantity>' requested here
configParam<MultiselectParamQuantity>(paramId, 0, size - 1, defaultValue, label);
^
1 error generated.
make: *** [build/src/Computerscare.cpp.o] Error 1
I have multiple subclasses here which might be relevant. I have ComputerscarePolyModule inheriting from Module
struct ComputerscarePolyModule : Module { //...
And then ComputerscareMenuParamModule inheriting from ComputerscarePolyModule
struct ComputerscareMenuParamModule : ComputerscarePolyModule { //...
I’m defining this struct which inherits from ParamQuantity:
struct MultiselectParamQuantity : ParamQuantity {
ComputerscareMenuParamModule* module;
std::string getDisplayValueString() override {
int index = Quantity::getValue();
return module->getOptionValue(paramId, index);
}
};
And the error comes from attempting to call configParam, passing this class as a template:
configParam<MultiselectParamQuantity>(paramId, 0, size - 1, defaultValue, label);
(line 183: computerscare-vcv-modules/MenuParams.hpp at v2.0.0 · freddyz/computerscare-vcv-modules · GitHub)
As the error message says, ParamQuantity doesn’t want me to set its module to an instance of ComputerscareMenuParamModule. This worked in v1 any ideas on what my problem is here?
Thanks in advance for any help anyone could offer!
