I have const correctness issue with QList.
I have a method getValue
whose signature i cannot change returning const double and here
double vs = MinInput->getValue(0, 0);
vs is const.
I would like to build QList with results from this method and i get error C3892.
Since my list is a QList, cannot add const double (?)
Code is like that
QList<double> minmax;
for (int i = 0; i < 2*(3+othercutoffs_var_len) ; i++ )
minmax.append( 0.0 );
QSP< const VarInterface<double> > MinInput = ctx.getInputVar<double>(ctx.input(Id::fromString(QL1s("Min")))[0] );
const double vs = MinInput->getValue(0, 0);
minmax.at(0) = vs;
and this very last line of code is getting me into trouble. (other errors when filling the list with other such const doubles)
signature for getValue is like that
const TYPE & VarData<TYPE>::getValue( uint r, uint c ) const