table: don't use shared_ptr in FIB
refs #3164
Change-Id: I5b5eb47d60f6bf5b6389c32ac840f793767e4334
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 378d285..c650587 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -96,9 +96,9 @@
public: // attached table entries
void
- setFibEntry(shared_ptr<fib::Entry> fibEntry);
+ setFibEntry(unique_ptr<fib::Entry> fibEntry);
- shared_ptr<fib::Entry>
+ fib::Entry*
getFibEntry() const;
void
@@ -133,7 +133,7 @@
Name m_prefix;
shared_ptr<Entry> m_parent; // Pointing to the parent entry.
std::vector<shared_ptr<Entry> > m_children; // Children pointers.
- shared_ptr<fib::Entry> m_fibEntry;
+ unique_ptr<fib::Entry> m_fibEntry;
std::vector<shared_ptr<pit::Entry> > m_pitEntries;
shared_ptr<measurements::Entry> m_measurementsEntry;
shared_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
@@ -187,10 +187,10 @@
return !m_children.empty();
}
-inline shared_ptr<fib::Entry>
+inline fib::Entry*
Entry::getFibEntry() const
{
- return m_fibEntry;
+ return m_fibEntry.get();
}
inline bool