File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,6 @@ InfomapIterator& InfomapIterator::operator++()
4444 m_current = nullptr ;
4545 return *this ;
4646 }
47-
48- if (m_moduleIndexLevel < 0 ) {
49- if (current->isLeafModule ()) { // TODO: Generalize to -2 for second level to bottom
50- ++m_moduleIndex;
51- }
52- } else if (static_cast <unsigned int >(m_moduleIndexLevel) == m_depth) {
53- ++m_moduleIndex;
54- }
5547 } else { // null also if no children in first place
5648 m_current = nullptr ;
5749 return *this ;
@@ -60,6 +52,11 @@ InfomapIterator& InfomapIterator::operator++()
6052 }
6153
6254 current = current->next ;
55+
56+ if (!current->isLeaf () && (m_moduleIndex < 0 || static_cast <unsigned int >(m_moduleIndexLevel) >= m_depth)) {
57+ ++m_moduleIndex;
58+ }
59+
6360 ++m_path.back ();
6461 }
6562
You can’t perform that action at this time.
0 commit comments