Fix part of old-style casting
[alexxy/gromacs.git] / src / gromacs / domdec / cellsizes.cpp
index e85f2e726fef7c5c490850bc6c5e297f7b0f1eb9..1a776ebf384e60ec975f6d55006ec0a472615c5e 100644 (file)
@@ -101,7 +101,7 @@ static void set_pme_maxshift(gmx_domdec_t *dd, gmx_ddpme_t *ddpme,
         for (s = 0; s < ns; s++)
         {
             /* PME slab s spreads atoms between box frac. s/ns and (s+1)/ns */
-            pme_boundary = (real)s/ns;
+            pme_boundary = static_cast<real>(s)/ns;
             while (sh + 1 < ns &&
                    ((s - (sh + 1) >= 0 &&
                      cellFrac[xmax[s - (sh + 1)     ] + 1]     + range > pme_boundary) ||
@@ -110,7 +110,7 @@ static void set_pme_maxshift(gmx_domdec_t *dd, gmx_ddpme_t *ddpme,
             {
                 sh++;
             }
-            pme_boundary = (real)(s+1)/ns;
+            pme_boundary = static_cast<real>(s+1)/ns;
             while (sh + 1 < ns &&
                    ((s + (sh + 1) <  ns &&
                      cellFrac[xmin[s + (sh + 1)    ]  ]     - range < pme_boundary) ||
@@ -759,10 +759,10 @@ static void distribute_dd_cell_sizes_dlb(gmx_domdec_t *dd,
         relative_to_absolute_cell_bounds(dd, ddbox, d1);
     }
     /* Convert the communicated shift from float to int */
-    comm.ddpme[0].maxshift = (int)(cellFracRow[pos++] + 0.5);
+    comm.ddpme[0].maxshift = static_cast<int>(cellFracRow[pos++] + 0.5);
     if (d >= 1)
     {
-        comm.ddpme[1].maxshift = (int)(cellFracRow[pos++] + 0.5);
+        comm.ddpme[1].maxshift = static_cast<int>(cellFracRow[pos++] + 0.5);
     }
 }