X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/30aca4d4af004d1ec899d12f0a9fe3997e9be15e..0eead244337fde8f0508629f8f8473f946c19f88:/src/kernel/routing/NetZoneImpl.cpp diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index 00a013898a..2944f7b332 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -27,11 +27,11 @@ public: NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, name) { - xbt_assert(nullptr == xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL), - "Refusing to create a second NetZone called '%s'.", name); + xbt_assert(nullptr == xbt_dict_get_or_null(netcards_dict, name), "Refusing to create a second NetZone called '%s'.", + name); netcard_ = new NetCard(name, NetCard::Type::NetZone, static_cast(father)); - xbt_lib_set(as_router_lib, name, ROUTING_ASR_LEVEL, static_cast(netcard_)); + xbt_dict_set(netcards_dict, name, static_cast(netcard_), nullptr); XBT_DEBUG("NetZone '%s' created with the id '%d'", name, netcard_->id()); } NetZoneImpl::~NetZoneImpl()