Fix part of old-style casting
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / topdirs.cpp
index bd8bb4d093c357956dc10a633a86ec94c90c0456..a57275f2a06d62c09a41d0ba362de711c79f2b37 100644 (file)
@@ -310,9 +310,9 @@ directive str2dir (char *dstr)
 
     for (d = 0; (d < d_maxdir); d++)
     {
-        if (gmx_strcasecmp_min(ptr, dir2str((directive)d)) == 0)
+        if (gmx_strcasecmp_min(ptr, dir2str(static_cast<directive>(d))) == 0)
         {
-            return (directive)d;
+            return static_cast<directive>(d);
         }
     }
 
@@ -331,7 +331,7 @@ static void set_nec(directive **n, ...)
     va_start(ap, n);
     do
     {
-        d = (directive)va_arg(ap, int);
+        d = static_cast<directive>(va_arg(ap, int));
         srenew(*n, ++ind);
         (*n)[ind-1] = d;
     }