Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify writing in model setup + may fix issue with unit-tests
[simgrid.git] / src / surf / network_ib.cpp
index c62ea55..47d7ef6 100644 (file)
@@ -35,8 +35,9 @@ void surf_network_model_init_IB()
   using simgrid::kernel::resource::NetworkIBModel;
 
   auto net_model = std::make_shared<NetworkIBModel>("Network_IB");
   using simgrid::kernel::resource::NetworkIBModel;
 
   auto net_model = std::make_shared<NetworkIBModel>("Network_IB");
-  simgrid::kernel::EngineImpl::get_instance()->add_model(net_model);
-  simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_network_model(net_model);
+  auto* engine   = simgrid::kernel::EngineImpl::get_instance();
+  engine->add_model(net_model);
+  engine->get_netzone_root()->set_network_model(net_model);
 
   simgrid::s4u::Link::on_communication_state_change.connect(NetworkIBModel::IB_action_state_changed_callback);
   simgrid::s4u::Link::on_communicate.connect(NetworkIBModel::IB_action_init_callback);
 
   simgrid::s4u::Link::on_communication_state_change.connect(NetworkIBModel::IB_action_state_changed_callback);
   simgrid::s4u::Link::on_communicate.connect(NetworkIBModel::IB_action_init_callback);