- if (!type->type_id)
- return;
- type->subtype = simgrid::util::find_map_ptr(info->types, type->type_id);
- if (type->subtype == nullptr)
- return;
- if (type->subtype->byte_size != 0)
- return;
- if (type->subtype->name.empty())
- return;
+ if (!type_id)
+ return nullptr;
+ simgrid::mc::Type* type = simgrid::util::find_map_ptr(info->types, type_id);
+ if (type == nullptr)
+ return nullptr;
+
+ // We already have the information on the type:
+ if (type->byte_size != 0)
+ return type;
+
+ // Don't have a name, we can't find a more complete version:
+ if (type->name.empty())
+ return type;
+