summaryrefslogtreecommitdiffstats
path: root/src/dotgfxhierarchytable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotgfxhierarchytable.cpp')
-rw-r--r--src/dotgfxhierarchytable.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp
index c535acf..9f81e22 100644
--- a/src/dotgfxhierarchytable.cpp
+++ b/src/dotgfxhierarchytable.cpp
@@ -116,7 +116,9 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSe
{
const auto &bn = it->second;
root = bn.get();
- if (n->children()==0 || n->children()->findRef(bn.get())==-1) // no arrow yet
+ const auto &children = n->children();
+ auto child_it = std::find(children.begin(),children.end(),bn.get());
+ if (child_it==children.end()) // no arrow yet
{
n->addChild(bn.get(),bcd.prot);
bn->addParent(n);