- int * cp = (int*)xbt_malloc(sizeof(int));
- *cp=*(int*)ptr_rank;
- xbt_dict_set(group->index_to_rank_map, key, cp, NULL);
+ int * cp = static_cast<int*>(xbt_malloc(sizeof(int)));
+ *cp=*reinterpret_cast<int*>(ptr_rank);
+ xbt_dict_set(group->index_to_rank_map, key, cp, nullptr);