Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allgather was forgotten in ti tracing. fix this
[simgrid.git] / src / instr / instr_paje_types.cpp
index 494ef42..389ff98 100644 (file)
@@ -52,10 +52,7 @@ void PJ_type_free (type_t type)
   xbt_dict_cursor_t cursor = nullptr;
   xbt_dict_foreach (type->values, cursor, value_name, val) {
     XBT_DEBUG("free value %s, child of %s", val->name, val->father->name);
-    xbt_free(val->name);
-    xbt_free(val->color);
-    xbt_free(val->id);
-    xbt_free(val);
+    delete val;
   }
   xbt_dict_free (&type->values);
   xbt_free (type->name);
@@ -115,14 +112,10 @@ type_t PJ_type_container_new (const char *name, type_t father)
     THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
   }
 
-  type_t ret = nullptr;
-
-  ret = newType (name, name, nullptr, TYPE_CONTAINER, father);
-  if (father == nullptr){
+  type_t ret = newType(name, name, nullptr, TYPE_CONTAINER, father);
+  if (father == nullptr) {
     rootType = ret;
-  }
-
-  if(father){
+  } else {
     XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
     DefineContainerEvent(ret);
   }