table: don't use shared_ptr in FIB
refs #3164
Change-Id: I5b5eb47d60f6bf5b6389c32ac840f793767e4334
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 9106d9f..8f83266 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -67,37 +67,33 @@
bool
hasNextHops() const;
- /** \return whether there is a NextHop record for face
- *
- * \todo change parameter type to Face&
+ /** \return whether there is a NextHop record for \p face
*/
bool
- hasNextHop(shared_ptr<Face> face) const;
+ hasNextHop(const Face& face) const;
/** \brief adds a NextHop record
*
- * If a NextHop record for face already exists, its cost is updated.
- * \note shared_ptr is passed by value because this function will take shared ownership
+ * If a NextHop record for \p face already exists, its cost is updated.
*/
void
- addNextHop(shared_ptr<Face> face, uint64_t cost);
+ addNextHop(Face& face, uint64_t cost);
/** \brief removes a NextHop record
*
* If no NextHop record for face exists, do nothing.
- *
- * \todo change parameter type to Face&
*/
void
- removeNextHop(shared_ptr<Face> face);
+ removeNextHop(const Face& face);
private:
- /** @note This method is non-const because normal iterator is needed by callers.
+ /** \note This method is non-const because mutable iterators are needed by callers.
*/
NextHopList::iterator
- findNextHop(Face& face);
+ findNextHop(const Face& face);
- /// sorts the nexthop list
+ /** \brief sorts the nexthop list
+ */
void
sortNextHops();