From: Martin Quinson Date: Thu, 1 Dec 2016 20:40:45 +0000 (+0100) Subject: cosmetics X-Git-Tag: v3_14~133 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d314c935dc20cc774a3c3be17a9863c492d6663c cosmetics --- diff --git a/src/s4u/s4u_engine.cpp b/src/s4u/s4u_engine.cpp index ad67fbd6fb..f28ecadc4d 100644 --- a/src/s4u/s4u_engine.cpp +++ b/src/s4u/s4u_engine.cpp @@ -29,7 +29,7 @@ Engine *Engine::instance_ = nullptr; /* That singleton is awful, but I don't see Engine::Engine(int *argc, char **argv) { xbt_assert(s4u::Engine::instance_ == nullptr, "It is currently forbidden to create more than one instance of s4u::Engine"); s4u::Engine::instance_ = this; - // pimpl = new kernel::EngineImpl(); + pimpl = new kernel::EngineImpl(); TRACE_global_init(argc, argv); SIMIX_global_init(argc, argv); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 6d6ba0c771..e1aecbce80 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -767,19 +767,16 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) break; } - - if (current_routing == nullptr && routing_platf->root_ == nullptr) { /* it is the first one */ + if (current_routing == nullptr) { /* it is the first one */ + xbt_assert(routing_platf->root_ == nullptr, "All defined components must belong to a AS"); routing_platf->root_ = new_as; - } else if (current_routing != nullptr && routing_platf->root_ != nullptr) { + } else { /* set the father behavior */ if (current_routing->hierarchy_ == simgrid::kernel::routing::AsImpl::RoutingMode::unset) current_routing->hierarchy_ = simgrid::kernel::routing::AsImpl::RoutingMode::recursive; /* add to the sons dictionary */ xbt_dict_set(current_routing->children(), AS->id, (void *) new_as, nullptr); - - } else { - THROWF(arg_error, 0, "All defined components must belong to a AS"); } /* set the new current component of the tree */