Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b9f0fe5c authored by hhakim's avatar hhakim
Browse files

Fix issue #251: windows compilation error because of a double-to-enum cast.

parent 80b2f4b2
No related branches found
No related tags found
No related merge requests found
...@@ -911,7 +911,7 @@ const Params<SCALAR, Cpu, FPP2>* mxArray2FaustParams(const mxArray* matlab_param ...@@ -911,7 +911,7 @@ const Params<SCALAR, Cpu, FPP2>* mxArray2FaustParams(const mxArray* matlab_param
if(presentFields[GRAD_CALC_OPT_MODE]) if(presentFields[GRAD_CALC_OPT_MODE])
{ {
mxCurrentField = mxGetField(matlab_params, 0, mat_field_type2str(GRAD_CALC_OPT_MODE).c_str()); mxCurrentField = mxGetField(matlab_params, 0, mat_field_type2str(GRAD_CALC_OPT_MODE).c_str());
params->gradCalcOptMode = (Faust::GradientCalcOptMode) mxGetScalar(mxCurrentField); params->gradCalcOptMode = (Faust::GradientCalcOptMode) (int) mxGetScalar(mxCurrentField); // VS can't directly cast to enum, so int is used as intermediate type // TODO: it should be a C++ static_cast
} }
return params; return params;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment