table: add more `noexcept`
Also merge fib-nexthop.hpp into fib-entry.hpp
Change-Id: Iec2fb90ede446f5b8d326c882904c70db45b87d6
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index cfbbc82..53d71bd 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -78,7 +78,7 @@
}
InRecordCollection::iterator
-Entry::findInRecord(const Face& face)
+Entry::findInRecord(const Face& face) noexcept
{
return std::find_if(m_inRecords.begin(), m_inRecords.end(),
[&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
@@ -89,8 +89,7 @@
{
BOOST_ASSERT(this->canMatch(interest));
- auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
- [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+ auto it = findInRecord(face);
if (it == m_inRecords.end()) {
m_inRecords.emplace_front(face);
it = m_inRecords.begin();
@@ -101,7 +100,7 @@
}
OutRecordCollection::iterator
-Entry::findOutRecord(const Face& face)
+Entry::findOutRecord(const Face& face) noexcept
{
return std::find_if(m_outRecords.begin(), m_outRecords.end(),
[&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
@@ -112,8 +111,7 @@
{
BOOST_ASSERT(this->canMatch(interest));
- auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
- [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+ auto it = findOutRecord(face);
if (it == m_outRecords.end()) {
m_outRecords.emplace_front(face);
it = m_outRecords.begin();