Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cast.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 29 Sep 2022 14:03:20 +0000 (16:03 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 29 Sep 2022 14:03:20 +0000 (16:03 +0200)
src/xbt/dict.cpp

index 59f4865..280d047 100644 (file)
@@ -89,7 +89,7 @@ static void xbt_dict_rehash(xbt_dict_t dict)
   const unsigned oldsize = dict->table_size + 1;
   unsigned newsize = oldsize * 2;
 
-  auto* newtable = static_cast<xbt_dictelm_t*>(xbt_realloc((char*)dict->table, newsize * sizeof(xbt_dictelm_t)));
+  auto* newtable = static_cast<xbt_dictelm_t*>(xbt_realloc(dict->table, newsize * sizeof(xbt_dictelm_t)));
   memset(&newtable[oldsize], 0, oldsize * sizeof(xbt_dictelm_t)); /* zero second half */
   newsize--;
   dict->table_size = newsize;