X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f2907d4c4e2bfdd55ae8a7c41711b731d106f668..6a711115accd081395c1ff0ac91835a612e9d781:/src/surf/network_interface.cpp diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index c315bb1002..81c55be208 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -30,25 +30,25 @@ namespace simgrid { int LinkImpl::linksCount() { return links->size(); + } + /** @brief Returns a list of all existing links */ + LinkImpl** LinkImpl::linksList() + { + LinkImpl** res = xbt_new(LinkImpl*, (int)links->size()); + int i = 0; + for (auto kv : *links) { + res[i] = kv.second; + i++; } - /** @brief Returns a list of all existing links */ - LinkImpl** LinkImpl::linksList() - { - LinkImpl** res = xbt_new(LinkImpl*, (int)links->size()); - int i = 0; - for (auto kv : *links) { - res[i] = kv.second; - i++; - } - return res; - } - /** @brief destructor of the static data */ - void LinkImpl::linksExit() - { - for (auto kv : *links) - (kv.second)->destroy(); - delete links; - } + return res; + } + /** @brief destructor of the static data */ + void LinkImpl::linksExit() + { + for (auto kv : *links) + (kv.second)->destroy(); + delete links; + } } }