diff --git a/mcstas-comps/contrib/Monochromator_bent.comp b/mcstas-comps/contrib/Monochromator_bent.comp index 42e0ed1a75..f196d07b88 100644 --- a/mcstas-comps/contrib/Monochromator_bent.comp +++ b/mcstas-comps/contrib/Monochromator_bent.comp @@ -839,7 +839,7 @@ INITIALIZE if (mosaicity && radius_x) monochromator.type = bent_mosaic; if (!radius_x && !mosaicity) monochromator.type = flat; // Read the designated plane of reflection, for use in the monochromator. - enum crystal_plane plane = stringToEnum(&plane_of_reflection); + enum crystal_plane plane = stringToEnum((const char *)&plane_of_reflection); // Set Monochromator values monochromator.length = zwidth; // [m] monochromator.height = yheight; // [m] diff --git a/mcstas-comps/contrib/StatisticalChopper_Monitor.comp b/mcstas-comps/contrib/StatisticalChopper_Monitor.comp index a257d91fa2..842b2d8b8e 100644 --- a/mcstas-comps/contrib/StatisticalChopper_Monitor.comp +++ b/mcstas-comps/contrib/StatisticalChopper_Monitor.comp @@ -89,13 +89,10 @@ SAVE /* the detector file written by the Monitor_nD is stored in a 'MCDETECTOR detector' structure */ /* get back information from the StatisticalChopper */ - int *m_ptr = COMP_GETPAR3(StatisticalChopper, comp, m); /* number of appertures in the sequence */ - int m = *m_ptr; - int *nslit_ptr = COMP_GETPAR3(StatisticalChopper, comp, nslit); /* length of the sequence (number of possible slits around disk) */ - int nslit = *nslit_ptr; - double *nu_ptr = COMP_GETPAR3(StatisticalChopper, comp, nu); - double nu = *nu_ptr; - int *Sequence= COMP_GETPAR3(StatisticalChopper, comp, Sequence); + int m = *COMP_GETPAR3(StatisticalChopper, comp, m); /* number of appertures in the sequence */ + int nslit = *COMP_GETPAR3(StatisticalChopper, comp, nslit); /* length of the sequence (number of possible slits around disk) */ + double nu = *COMP_GETPAR3(StatisticalChopper, comp, nu); + int *Sequence= *COMP_GETPAR3(StatisticalChopper, comp, Sequence); double c = (double)(m-1)/(double)(nslit-1); /* duty cycle */ int f; /* number of periods in the detected time range */