break;
}
}
- surf_parse_error(std::move(msg));
+ surf_parse_error(msg);
}
double surf_parse_get_double(const std::string& s)
/* Turn something like "1-4,6,9-11" into the vector {1,2,3,4,6,9,10,11} */
static std::vector<int>* explodesRadical(const std::string& radicals)
{
- std::vector<int>* exploded = new std::vector<int>();
+ auto* exploded = new std::vector<int>();
// Make all hosts
std::vector<std::string> radical_elements;
route.dst = sg_netpoint_by_name_or_null(A_surfxml_route_dst); // tested to not be nullptr in start tag
route.gw_src = nullptr;
route.gw_dst = nullptr;
- route.symmetrical = (A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES);
+ route.symmetrical = (A_surfxml_route_symmetrical == AU_surfxml_route_symmetrical ||
+ A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES ||
+ A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_yes);
route.link_list.swap(parsed_link_list);
ASroute.link_list.swap(parsed_link_list);
- switch (A_surfxml_zoneRoute_symmetrical) {
- case AU_surfxml_zoneRoute_symmetrical:
- case A_surfxml_zoneRoute_symmetrical_YES:
- ASroute.symmetrical = true;
- break;
- case A_surfxml_zoneRoute_symmetrical_NO:
- ASroute.symmetrical = false;
- break;
- default:
- THROW_IMPOSSIBLE;
- }
+ ASroute.symmetrical = (A_surfxml_zoneRoute_symmetrical == AU_surfxml_zoneRoute_symmetrical ||
+ A_surfxml_zoneRoute_symmetrical == A_surfxml_zoneRoute_symmetrical_YES ||
+ A_surfxml_zoneRoute_symmetrical == A_surfxml_zoneRoute_symmetrical_yes);
sg_platf_new_route(&ASroute);
}
void STag_surfxml_AS()
{
AX_surfxml_zone_id = AX_surfxml_AS_id;
- AX_surfxml_zone_routing = (AT_surfxml_zone_routing)AX_surfxml_AS_routing;
+ AX_surfxml_zone_routing = AX_surfxml_AS_routing;
STag_surfxml_zone();
}
property_sets.push_back(new std::unordered_map<std::string, std::string>());
simgrid::kernel::routing::ZoneCreationArgs zone;
zone.id = A_surfxml_zone_id;
- zone.routing = static_cast<int>(A_surfxml_zone_routing);
+ zone.routing = A_surfxml_zone_routing;
sg_platf_new_Zone_begin(&zone);
}
for (std::string key : keys) {
if (simgrid::config::is_default(key.c_str())) {
std::string cfg = key + ":" + current_property_set->at(key);
- simgrid::config::set_parse(std::move(cfg));
+ simgrid::config::set_parse(cfg);
} else
XBT_INFO("The custom configuration '%s' is already defined by user!", key.c_str());
}
}
void STag_surfxml_argument(){
- arguments.push_back(A_surfxml_argument_value);
+ arguments.emplace_back(A_surfxml_argument_value);
}
void STag_surfxml_model___prop(){