X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7e1931bdf65d5bc5f13b64688dc215e1585931c9..cd7c99997320509f64f9a11948573f0a0d3e2b82:/src/surf/xml/surfxml_sax_cb.cpp diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 0b49682258..2cd4006951 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -34,19 +34,15 @@ std::vector parsed_disk_list; /* temporary /* * 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) @@ -251,7 +247,6 @@ double surf_parse_get_speed(const char* string, const char* entity_kind, const s static std::vector surf_parse_get_all_speeds(char* speeds, const char* entity_kind, const std::string& id) { - std::vector speed_per_pstate; if (strchr(speeds, ',') == nullptr){ @@ -956,10 +951,10 @@ void ETag_surfxml_actor() 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");