X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cd4a6bff769c06de3840b08926eccf0734642f57..2aaf66237295992a6fb4b0873b26075bd3a7f44a:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index bbe48f2852..08386317d9 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -452,13 +452,14 @@ void sg_platf_new_bypass_route(simgrid::kernel::routing::RouteCreationArgs* rout void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) { + auto* engine = simgrid::s4u::Engine::get_instance(); sg_host_t host = sg_host_by_name(actor->host); if (not host) { // The requested host does not exist. Do a nice message to the user std::string msg = std::string("Cannot create actor '") + actor->function + "': host '" + actor->host + "' does not exist\nExisting hosts: '"; - std::vector list = simgrid::s4u::Engine::get_instance()->get_all_hosts(); + std::vector list = engine->get_all_hosts(); for (auto const& some_host : list) { msg += some_host->get_name(); @@ -471,8 +472,7 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) } xbt_die("%s", msg.c_str()); } - const simgrid::kernel::actor::ActorCodeFactory& factory = - simgrid::kernel::EngineImpl::get_instance()->get_function(actor->function); + const simgrid::kernel::actor::ActorCodeFactory& factory = engine->get_impl()->get_function(actor->function); xbt_assert(factory, "Error while creating an actor from the XML file: Function '%s' not registered", actor->function); double start_time = actor->start_time;