- // check if key exists: if it doesn't, set the variable to zero and mark this in the dict
- if (!xbt_dict_get_or_null(platform_variables, key)) {
- container_t container = PJ_container_get (resource);
- type_t type = PJ_type_get (variable, container->type);
- new SetVariableEvent (now, container, type, 0);
- xbt_dict_set(platform_variables, key, (char*)"", nullptr);
+ // check if key exists: if it doesn't, set the variable to zero and mark this in the global map.
+ if (platform_variables.find(key) == platform_variables.end()) {
+ new simgrid::instr::SetVariableEvent(now, resource, variable, 0);
+ platform_variables[key] = std::string("");