* Helping functions
*/
void surf_parse_assert(bool cond, const char *fmt, ...) {
- if (!cond ) {
+ if (not cond) {
va_list va;
va_start(va,fmt);
int lineno = surf_parse_lineno;
storage.id = A_surfxml_storage_id;
storage.type_id = A_surfxml_storage_typeId;
storage.content = A_surfxml_storage_content;
- storage.content_type = A_surfxml_storage_content___type;
+
storage.attach = A_surfxml_storage_attach;
sg_platf_new_storage(&storage);
}
current_model_property_set = nullptr;
storage_type.content = A_surfxml_storage___type_content;
- storage_type.content_type = A_surfxml_storage___type_content___type;
storage_type.id = A_surfxml_storage___type_id;
storage_type.model = A_surfxml_storage___type_model;
storage_type.size = surf_parse_get_size(A_surfxml_storage___type_size,
netzone->setProperty(A_surfxml_prop_id, A_surfxml_prop_value);
}
else{
- if (!current_property_set)
+ if (not current_property_set)
current_property_set = xbt_dict_new_homogeneous(&xbt_free_f); // Maybe, it should raise an error
xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), nullptr);
XBT_DEBUG("add prop %s=%s into current property set %p", A_surfxml_prop_id, A_surfxml_prop_value,
}
void STag_surfxml_model___prop(){
- if (!current_model_property_set)
+ if (not current_model_property_set)
current_model_property_set = new std::map<std::string, std::string>();
current_model_property_set->insert(
xbt_free(dir);
surf_file_to_parse = surf_fopen(file, "r");
- xbt_assert((surf_file_to_parse), "Unable to open \"%s\"\n", file);
+ xbt_assert(surf_file_to_parse != nullptr, "Unable to open '%s'\n", file);
surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
surf_parse__switch_to_buffer(surf_input_buffer);
surf_parse_lineno = 1;