From 30dcd207e3a68158b0af4ed3d6fccf620cfe2966 Mon Sep 17 00:00:00 2001 From: SUTER Frederic Date: Mon, 6 Sep 2021 13:55:51 +0200 Subject: [PATCH] do not use unsigned there, -1 is used to indicate there is no route between hosts --- include/simgrid/kernel/routing/FloydZone.hpp | 2 +- src/kernel/routing/FloydZone.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/simgrid/kernel/routing/FloydZone.hpp b/include/simgrid/kernel/routing/FloydZone.hpp index 46f12088c2..990071a265 100644 --- a/include/simgrid/kernel/routing/FloydZone.hpp +++ b/include/simgrid/kernel/routing/FloydZone.hpp @@ -23,7 +23,7 @@ namespace routing { */ class XBT_PRIVATE FloydZone : public RoutedZone { /* vars to compute the Floyd algorithm. */ - std::vector> predecessor_table_; + std::vector> predecessor_table_; std::vector> cost_table_; std::vector>> link_table_; diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index feda4acfb5..8de2e8cd46 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -41,7 +41,7 @@ void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* std::vector route_stack; unsigned long cur = dst->id(); do { - int pred = predecessor_table_[src->id()][cur]; + long pred = predecessor_table_[src->id()][cur]; if (pred == -1) throw std::invalid_argument(xbt::string_printf("No route from '%s' to '%s'", src->get_cname(), dst->get_cname())); route_stack.push_back(link_table_[pred][cur].get()); -- 2.20.1