table: NameTree enumeration
refs #1318
Change-Id: I26f25cefe8f2939ca884103f1b081c0c02325207
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 32aabbf..eea7641 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -87,13 +87,12 @@
void
Fib::removeNextHopFromAllEntries(shared_ptr<Face> face)
{
- shared_ptr<std::vector<shared_ptr<name_tree::Entry > > > nameTreeEntries =
- m_nameTree.fullEnumerate(&predicate_NameTreeEntry_hasFibEntry);
- for (size_t i = 0; i < nameTreeEntries->size(); ++i) {
- shared_ptr<fib::Entry> entry = nameTreeEntries->at(i)->getFibEntry();
+ for (NameTree::const_iterator it =
+ m_nameTree.fullEnumerate(&predicate_NameTreeEntry_hasFibEntry); it != m_nameTree.end(); it++)
+ {
+ shared_ptr<fib::Entry> entry = it->getFibEntry();
entry->removeNextHop(face);
}
}
-
} // namespace nfd