*/
#include "gmxpre.h"
-#include <math.h>
-#include <string.h>
+#include <cmath>
+#include <cstring>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/trxio.h"
if (!*nslices)
{
- *nslices = (int)(box[axis][axis] * 10); /* default value */
+ *nslices = static_cast<int>(box[axis][axis] * 10); /* default value */
}
*/
if (bMicel)
- { /* this is for spherical interfaces */
- rvec_sub(com, x0[index[3*i]], normal); /* vector from Oxygen to COM */
- slice = norm(normal)/(*slWidth); /* spherical slice */
+ { /* this is for spherical interfaces */
+ rvec_sub(com, x0[index[3*i]], normal); /* vector from Oxygen to COM */
+ slice = static_cast<int>(norm(normal)/(*slWidth)); /* spherical slice */
sum[slice] += iprod(dipole, normal) / (norm(dipole) * norm(normal));
frame[slice] += iprod(dipole, normal) / (norm(dipole) * norm(normal));
/* this is for flat interfaces */
/* determine which slice atom is in */
- slice = (x0[index[3*i]][axis] / (*slWidth));
+ slice = static_cast<int>(x0[index[3*i]][axis] / (*slWidth));
if (slice < 0 || slice >= *nslices)
{
fprintf(stderr, "Coordinate: %f ", x0[index[3*i]][axis]);