Fix part of old-style casting
[alexxy/gromacs.git] / src / gromacs / fileio / tngio.cpp
index 268b4fbd428245e3175cab28b65fc1bdf27f1593..1df209b6398b5e823939360e8cdf067c2f35773c 100644 (file)
@@ -874,7 +874,7 @@ void gmx_fwrite_tng(gmx_tng_trajectory_t gmx_tng,
     }
 
     tng_num_particles_get(tng, &nParticles);
-    if (nAtoms != (int)nParticles)
+    if (nAtoms != static_cast<int>(nParticles))
     {
         tng_implicit_num_particles_set(tng, nAtoms);
     }
@@ -1539,7 +1539,7 @@ gmx_bool gmx_read_next_tng_frame(gmx_tng_trajectory_t        gmx_tng_input,
             case TNG_TRAJ_VELOCITIES:
                 srenew(fr->v, fr->natoms);
                 convert_array_to_real_array(values,
-                                            (real *) fr->v,
+                                            reinterpret_cast<real *>(fr->v),
                                             getDistanceScaleFactor(gmx_tng_input),
                                             fr->natoms,
                                             DIM,
@@ -1635,11 +1635,11 @@ void gmx_print_tng_molecule_system(gmx_tng_trajectory_t gmx_tng_input,
         tng_molecule_name_get(input, molecule, str, 256);
         if (varNAtoms == TNG_CONSTANT_N_ATOMS)
         {
-            if ((int)molCntList[i] == 0)
+            if (static_cast<int>(molCntList[i]) == 0)
             {
                 continue;
             }
-            fprintf(stream, "Molecule: %s, count: %d\n", str, (int)molCntList[i]);
+            fprintf(stream, "Molecule: %s, count: %d\n", str, static_cast<int>(molCntList[i]));
         }
         else
         {