/*
* Helping functions
*/
-void surf_parse_assert(bool cond, std::string&& msg)
+void surf_parse_assert(bool cond, const std::string& msg)
{
if (not cond)
- surf_parse_error(std::move(msg));
+ surf_parse_error(msg);
}
-void surf_parse_error(const char* msg) {
- throw simgrid::ParseError(surf_parse_lineno, surf_parsed_filename, std::string(msg));
-}
-
-void surf_parse_error(std::string&& msg)
+void surf_parse_error(const std::string& msg)
{
- throw simgrid::ParseError(surf_parse_lineno, surf_parsed_filename, std::move(msg));
+ throw simgrid::ParseError(surf_parsed_filename, surf_parse_lineno, msg);
}
void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
static std::vector<double> surf_parse_get_all_speeds(char* speeds, const char* entity_kind, const std::string& id)
{
-
std::vector<double> speed_per_pstate;
if (strchr(speeds, ',') == nullptr){
switch (A_surfxml_actor_on___failure) {
case AU_surfxml_actor_on___failure:
case A_surfxml_actor_on___failure_DIE:
- actor.on_failure = simgrid::kernel::routing::ActorOnFailure::DIE;
+ actor.restart_on_failure = false;
break;
case A_surfxml_actor_on___failure_RESTART:
- actor.on_failure = simgrid::kernel::routing::ActorOnFailure::RESTART;
+ actor.restart_on_failure = true;
break;
default:
surf_parse_error("Invalid on failure behavior");