-/* 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. */
Route* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst,
const std::vector<resource::StandardLinkImpl*>& 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;
}