Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Revert "cast once for all at surf level and not in the APIs""
[simgrid.git] / src / msg / msg_io.cpp
index 3341faf..3b06812 100644 (file)
@@ -447,8 +447,8 @@ msg_storage_t __MSG_storage_create(smx_storage_t storage)
   msg_storage_priv_t storage_private = xbt_new0(s_msg_storage_priv_t, 1);
 
   storage_private->name     = SIMIX_storage_get_name(storage);
-  storage_private->hostname = SIMIX_storage_get_host(storage);
-  storage_private->size     = SIMIX_storage_get_size(storage);
+  storage_private->hostname = surf_storage_get_host(storage);
+  storage_private->size     = surf_storage_get_size(storage);
 
   xbt_lib_set(storage_lib, storage_private->name, MSG_STORAGE_LEVEL, storage_private);
   return xbt_lib_get_elm_or_null(storage_lib, storage_private->name);
@@ -587,8 +587,7 @@ void *MSG_storage_get_data(msg_storage_t storage)
  */
 xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
 {
-  std::map<std::string, sg_size_t*>* content =
-      static_cast<simgrid::surf::Storage*>(surf_storage_resource_priv(storage))->getContent();
+  std::map<std::string, sg_size_t*>* content = surf_storage_resource_priv(storage)->getContent();
   xbt_dict_t content_dict = xbt_dict_new_homogeneous(nullptr);
 
   for (auto entry : *content) {