1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

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

llvm-svn: 176516
This commit is contained in:
Jakub Staszak 2013-03-05 21:53:57 +00:00
parent 509bee9bf5
commit 7354768c56

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.