nlsr: refactor Adjacent to use FaceUri objects
Change-Id: Ib46f70570669c381572182eeea5c047a38a05104
refs: #4063
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index 56807c7..ccbea1b 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -258,8 +258,18 @@
_1, faceId));
}
+AdjacencyList::iterator
+AdjacencyList::findAdjacent(const ndn::util::FaceUri& faceUri)
+{
+ return std::find_if(m_adjList.begin(),
+ m_adjList.end(),
+ [&faceUri] (const Adjacent& adj) {
+ return faceUri == adj.getFaceUri();
+ });
+}
+
uint64_t
-AdjacencyList::getFaceId(const std::string& faceUri)
+AdjacencyList::getFaceId(const ndn::util::FaceUri& faceUri)
{
std::list<Adjacent>::iterator it = std::find_if(m_adjList.begin(),
m_adjList.end(),