X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/14262a27cd78687e6a762eff0e58166fd35e5625..69b64311b67fddc105da16faded6fecec9db45d3:/src/s4u/s4u_netzone.cpp diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 5377233560..153be093f9 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -23,7 +23,13 @@ simgrid::xbt::signalname()); + if (host != nullptr) + hosts_->push_back(host); + } } + void NetZone::seal() { sealed_ = true; @@ -72,16 +78,9 @@ NetZone* NetZone::father() return father_; } -std::vector NetZone::hosts() +std::vector* NetZone::hosts() { - std::vector res; - - for (auto card : vertices_) { - s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->name()); - if (host != nullptr) - res.push_back(host); - } - return res; + return hosts_; } int NetZone::addComponent(kernel::routing::NetPoint* elm)