A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code simplification: write the recursivity properly
[simgrid.git]
/
src
/
kernel
/
routing
/
AsImpl.cpp
diff --git
a/src/kernel/routing/AsImpl.cpp
b/src/kernel/routing/AsImpl.cpp
index
9fe0cef
..
a0841b9
100644
(file)
--- a/
src/kernel/routing/AsImpl.cpp
+++ b/
src/kernel/routing/AsImpl.cpp
@@
-43,6
+43,13
@@
namespace simgrid {
void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
{
void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
{
+ // recursing only. I have no route myself :)
+ char* key;
+ xbt_dict_cursor_t cursor = nullptr;
+ AsImpl* rc_child;
+ xbt_dict_foreach (children(), cursor, key, rc_child) {
+ rc_child->getOneLinkRoutes(accumulator);
+ }
}
/** @brief Get the common ancestor and its first children in each line leading to src and dst
}
/** @brief Get the common ancestor and its first children in each line leading to src and dst