X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e91f26820b30a2d87b4c723e92eaebbd2dc5ce15..90bddc474870ce50b5398b88c7de59336d00a85f:/src/kernel/routing/RoutedZone.cpp diff --git a/src/kernel/routing/RoutedZone.cpp b/src/kernel/routing/RoutedZone.cpp index 908f57e131..8457254713 100644 --- a/src/kernel/routing/RoutedZone.cpp +++ b/src/kernel/routing/RoutedZone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -12,7 +12,7 @@ #include "xbt/sysdep.h" #include "xbt/asserts.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_generic, ker_routing, "Kernel Generic Routing"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_generic, ker_platform, "Kernel Generic Routing"); /* ***************************************************************** */ /* *********************** GENERIC METHODS ************************* */ @@ -27,11 +27,10 @@ RoutedZone::RoutedZone(const std::string& name) : NetZoneImpl(name) {} Route* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst, const std::vector& link_list, bool preserve_order) { - auto* result = new Route(); + xbt_enforce(hierarchy != RoutingMode::recursive || (gw_src && gw_dst), "nullptr is obviously a deficient gateway"); + auto* result = new Route(); if (hierarchy == RoutingMode::recursive) { - xbt_enforce(gw_src && gw_dst, "nullptr is obviously a deficient gateway"); - result->gw_src_ = gw_src; result->gw_dst_ = gw_dst; }