std::distance() == 0 means that iterators are equal. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakub Staszak 2013-03-05 21:53:57 +00:00
parent cf70590c38
commit aa4e2aea9e

View File

@ -663,8 +663,7 @@ public:
// Initialize the roots list
for (typename TraitsTy::nodes_iterator I = TraitsTy::nodes_begin(&F),
E = TraitsTy::nodes_end(&F); I != E; ++I) {
if (std::distance(TraitsTy::child_begin(I),
TraitsTy::child_end(I)) == 0)
if (TraitsTy::child_begin(I) == TraitsTy::child_end(I))
addRoot(I);
// Prepopulate maps so that we don't get iterator invalidation issues later.