table: don't use shared_ptr in FIB
refs #3164
Change-Id: I5b5eb47d60f6bf5b6389c32ac840f793767e4334
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 889ed97..87853f2 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.cpp
@@ -65,14 +65,14 @@
}
void
-Entry::setFibEntry(shared_ptr<fib::Entry> fibEntry)
+Entry::setFibEntry(unique_ptr<fib::Entry> fibEntry)
{
BOOST_ASSERT(fibEntry == nullptr || fibEntry->m_nameTreeEntry.expired());
if (m_fibEntry != nullptr) {
m_fibEntry->m_nameTreeEntry.reset();
}
- m_fibEntry = fibEntry;
+ m_fibEntry = std::move(fibEntry);
if (m_fibEntry != nullptr) {
m_fibEntry->m_nameTreeEntry = this->shared_from_this();