summaryrefslogtreecommitdiff
path: root/xmlhelp/source/treeview/tvread.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlhelp/source/treeview/tvread.cxx')
-rw-r--r--xmlhelp/source/treeview/tvread.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 2d98eb7755dd..c8006bee590f 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -503,11 +503,11 @@ TVChildTarget::SearchAndInsert(std::unique_ptr<TVDom> p, TVDom* tvDom)
}
else
{
- i = tvDom->children.begin();
- while ((i!=tvDom->children.end()) && (p != nullptr))
+ for (auto& child : tvDom->children)
{
- p = SearchAndInsert(std::move(p), i->get());
- ++i;
+ p = SearchAndInsert(std::move(p), child.get());
+ if (p == nullptr)
+ break;
}
return p;
}