Fix part of old-style casting
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / grompp.cpp
index 31ab064463da616713fd6d1bc69633aaf307174b..c3fe8e350d5521f7e5acf53a4684de07d841215c 100644 (file)
@@ -2062,7 +2062,7 @@ int gmx_grompp(int argc, char *argv[])
                 else
                 {
                     sprintf(warn_buf, "NVE simulation with an initial temperature of zero: will use a Verlet buffer of %d%%. Check your energy drift!",
-                            (int)(verlet_buffer_ratio_NVE_T0*100 + 0.5));
+                            static_cast<int>(verlet_buffer_ratio_NVE_T0*100 + 0.5));
                     warning_note(wi, warn_buf);
                 }
             }
@@ -2100,8 +2100,8 @@ int gmx_grompp(int argc, char *argv[])
                     {
                         sprintf(warn_buf, "You are using a Verlet buffer tolerance of %g kJ/mol/ps for an NVE simulation of length %g ps, which can give a final drift of %d%%. For conserving energy to %d%% when using constraints, you might need to set verlet-buffer-tolerance to %.1e.",
                                 ir->verletbuf_tol, ir->nsteps*ir->delta_t,
-                                (int)(ir->verletbuf_tol/totalEnergyDriftPerAtomPerPicosecond*100 + 0.5),
-                                (int)(100*driftTolerance + 0.5),
+                                static_cast<int>(ir->verletbuf_tol/totalEnergyDriftPerAtomPerPicosecond*100 + 0.5),
+                                static_cast<int>(100*driftTolerance + 0.5),
                                 driftTolerance*totalEnergyDriftPerAtomPerPicosecond);
                         warning_note(wi, warn_buf);
                     }