Fix part of old-style casting
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / h_db.cpp
index 52c634696d1d7d91818d412750c7095afb15a211..d21ff1094f9231217b35bdcc7f1de5480365b212 100644 (file)
@@ -188,7 +188,7 @@ static void read_h_db_file(const char *hfn, int *nahptr, t_hackblock **ah)
     if (nah > 0)
     {
         /* Sort the list (necessary to be able to use bsearch */
-        qsort(aah, nah, (size_t)sizeof(**ah), compaddh);
+        qsort(aah, nah, static_cast<size_t>(sizeof(**ah)), compaddh);
     }
 
     *nahptr = nah;
@@ -228,7 +228,7 @@ t_hackblock *search_h_db(int nh, t_hackblock ah[], char *key)
 
     ahkey.name = key;
 
-    result = static_cast<t_hackblock *>(bsearch(&ahkey, ah, nh, (size_t)sizeof(ah[0]), compaddh));
+    result = static_cast<t_hackblock *>(bsearch(&ahkey, ah, nh, static_cast<size_t>(sizeof(ah[0])), compaddh));
 
     return result;
 }