nlsr: Don't use ndn aliases provided by ndn-cxx/common.hpp
refs: #3983
Change-Id: I31da8d68e0285dcfe9c7d3e5e678c00397d22bef
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index d12109d..5de9929 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -53,7 +53,7 @@
_LOG_DEBUG("Fib::scheduleEntryExpiration Called");
_LOG_INFO("Name: " << name << " Seq Num: " << feSeqNum);
- return m_scheduler.scheduleEvent(expTime, ndn::bind(&Fib::remove, this, name));
+ return m_scheduler.scheduleEvent(expTime, std::bind(&Fib::remove, this, name));
}
void
@@ -117,7 +117,7 @@
// See if the nexthop is installed in NFD's FIB
NexthopList::const_iterator foundIt = std::find_if(installedHops.cbegin(),
installedHops.cend(),
- bind(&compareFaceUri, _1, faceUri));
+ std::bind(&compareFaceUri, _1, faceUri));
// The next hop is not installed
if (foundIt == installedHops.cend()) {
@@ -287,7 +287,7 @@
const CommandFailCallback& onFailure)
{
createFace(faceUri,
- ndn::bind(&Fib::destroyFaceInNfd, this, _1, onSuccess, onFailure),
+ std::bind(&Fib::destroyFaceInNfd, this, _1, onSuccess, onFailure),
onFailure);
}
@@ -353,7 +353,7 @@
.setExpirationPeriod(timeout)
.setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
createFace(faceUri,
- ndn::bind(static_cast<RegisterPrefixCallback>(&Fib::registerPrefixInNfd),
+ std::bind(static_cast<RegisterPrefixCallback>(&Fib::registerPrefixInNfd),
this, _1, parameters, times, onSuccess, onFailure),
onFailure);
}
@@ -364,10 +364,10 @@
uint8_t times)
{
m_controller.start<ndn::nfd::RibRegisterCommand>(parameters,
- ndn::bind(&Fib::onRegistration, this, _1,
+ std::bind(&Fib::onRegistration, this, _1,
"Successful in name registration",
faceUri),
- ndn::bind(&Fib::onRegistrationFailure,
+ std::bind(&Fib::onRegistrationFailure,
this, _1,
"Failed in name registration",
parameters,
@@ -406,9 +406,9 @@
.setFaceId(faceId)
.setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
m_controller.start<ndn::nfd::RibUnregisterCommand>(controlParameters,
- ndn::bind(&Fib::onUnregistration, this, _1,
+ std::bind(&Fib::onUnregistration, this, _1,
"Successful in unregistering name"),
- ndn::bind(&Fib::onUnregistrationFailure,
+ std::bind(&Fib::onUnregistrationFailure,
this, _1,
"Failed in unregistering name"));
}
@@ -423,9 +423,9 @@
.setStrategy(strategy);
m_controller.start<ndn::nfd::StrategyChoiceSetCommand>(parameters,
- bind(&Fib::onSetStrategySuccess, this, _1,
+ std::bind(&Fib::onSetStrategySuccess, this, _1,
"Successfully set strategy choice"),
- bind(&Fib::onSetStrategyFailure, this, _1,
+ std::bind(&Fib::onSetStrategyFailure, this, _1,
parameters,
count,
"Failed to set strategy choice"));
diff --git a/src/route/map.cpp b/src/route/map.cpp
index 229b23b..a97be11 100644
--- a/src/route/map.cpp
+++ b/src/route/map.cpp
@@ -62,7 +62,7 @@
//cout << mpe;
std::list<MapEntry>::iterator it = std::find_if(m_table.begin(),
m_table.end(),
- ndn::bind(&mapEntryCompareByRouter,
+ std::bind(&mapEntryCompareByRouter,
_1, mpe.getRouter()));
if (it == m_table.end()) {
m_table.push_back(mpe);
@@ -76,7 +76,7 @@
{
std::list<MapEntry>::iterator it = std::find_if(m_table.begin(),
m_table.end(),
- ndn::bind(&mapEntryCompareByMappingNo,
+ std::bind(&mapEntryCompareByMappingNo,
_1, mn));
if (it != m_table.end()) {
return (*it).getRouter();
@@ -89,7 +89,7 @@
{
std::list<MapEntry>::iterator it = std::find_if(m_table.begin(),
m_table.end(),
- ndn::bind(&mapEntryCompareByRouter,
+ std::bind(&mapEntryCompareByRouter,
_1, rName));
if (it != m_table.end()) {
return (*it).getMappingNumber();
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index 922b24c..1abc87b 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -43,7 +43,7 @@
}
uint64_t
-NamePrefixTableEntry::removeRoutingTableEntry(shared_ptr<RoutingTablePoolEntry>
+NamePrefixTableEntry::removeRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
rtpePtr)
{
auto rtpeItr = std::find(m_rteList.begin(), m_rteList.end(), rtpePtr);
@@ -60,7 +60,7 @@
}
void
-NamePrefixTableEntry::addRoutingTableEntry(shared_ptr<RoutingTablePoolEntry>
+NamePrefixTableEntry::addRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
rtpePtr)
{
auto rtpeItr = std::find(m_rteList.begin(), m_rteList.end(), rtpePtr);
@@ -105,7 +105,7 @@
{
os << "Name: " << entry.getNamePrefix() << "\n";
- for (const shared_ptr<RoutingTablePoolEntry> rtpePtr : entry.getRteList()) {
+ for (const std::shared_ptr<RoutingTablePoolEntry> rtpePtr : entry.getRteList()) {
os << "Destination: " << rtpePtr->getDestination() << "\n";
}
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index 3c98c0a..6467790 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -141,7 +141,7 @@
// Ensure that the entry exists
NptEntryList::iterator nameItr = std::find_if(m_table.begin(),
m_table.end(),
- bind(&npteCompare, _1, name));
+ std::bind(&npteCompare, _1, name));
if (nameItr != m_table.end()) {
_LOG_TRACE("Removing origin: " << rtpePtr->getDestination()
<< " from prefix: " << *nameItr);
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp
index 2d150dd..c2e5fa6 100644
--- a/src/route/nexthop-list.cpp
+++ b/src/route/nexthop-list.cpp
@@ -81,7 +81,7 @@
{
std::set<NextHop, NextHopComparator>::iterator it = std::find_if(m_nexthopList.begin(),
m_nexthopList.end(),
- ndn::bind(&nexthopAddCompare, _1, nh));
+ std::bind(&nexthopAddCompare, _1, nh));
if (it == m_nexthopList.end()) {
m_nexthopList.insert(nh);
}
@@ -96,7 +96,7 @@
{
std::set<NextHop, NextHopComparator>::iterator it = std::find_if(m_nexthopList.begin(),
m_nexthopList.end(),
- ndn::bind(&nexthopRemoveCompare, _1, nh));
+ std::bind(&nexthopRemoveCompare, _1, nh));
if (it != m_nexthopList.end()) {
m_nexthopList.erase(it);
}
diff --git a/src/route/routing-table-entry.hpp b/src/route/routing-table-entry.hpp
index d5d01b9..b553fa1 100644
--- a/src/route/routing-table-entry.hpp
+++ b/src/route/routing-table-entry.hpp
@@ -81,4 +81,4 @@
} // namespace nlsr
-#endif //NLSR_ROUTING_TABLE_ENTRY_HPP
+#endif // NLSR_ROUTING_TABLE_ENTRY_HPP
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index e61d4d0..b1e02dc 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -130,7 +130,7 @@
LinkStateRoutingTableCalculator calculator(nRouters);
- calculator.calculatePath(map, ndn::ref(*this), nlsr);
+ calculator.calculatePath(map, std::ref(*this), nlsr);
}
void
@@ -145,7 +145,7 @@
HyperbolicRoutingCalculator calculator(nRouters, false,
nlsr.getConfParameter().getRouterPrefix());
- calculator.calculatePaths(map, ndn::ref(*this),
+ calculator.calculatePaths(map, std::ref(*this),
nlsr.getLsdb(), nlsr.getAdjacencyList());
}
@@ -161,7 +161,7 @@
HyperbolicRoutingCalculator calculator(nRouters, true,
nlsr.getConfParameter().getRouterPrefix());
- calculator.calculatePaths(map, ndn::ref(*this),
+ calculator.calculatePaths(map, std::ref(*this),
nlsr.getLsdb(), nlsr.getAdjacencyList());
}
@@ -172,7 +172,7 @@
_LOG_DEBUG("Scheduling routing table calculation in " << m_routingCalcInterval);
m_scheduler.scheduleEvent(m_routingCalcInterval,
- ndn::bind(&RoutingTable::calculate, this, ndn::ref(pnlsr)));
+ std::bind(&RoutingTable::calculate, this, std::ref(pnlsr)));
pnlsr.setIsRouteCalculationScheduled(true);
}
@@ -205,7 +205,7 @@
{
std::list<RoutingTableEntry>::iterator it = std::find_if(m_rTable.begin(),
m_rTable.end(),
- ndn::bind(&routingTableEntryCompare,
+ std::bind(&routingTableEntryCompare,
_1, destRouter));
if (it != m_rTable.end()) {
return &(*it);
@@ -242,7 +242,7 @@
std::list<RoutingTableEntry>::iterator it = std::find_if(m_dryTable.begin(),
m_dryTable.end(),
- ndn::bind(&routingTableEntryCompare,
+ std::bind(&routingTableEntryCompare,
_1, destRouter));
if (it == m_dryTable.end()) {
RoutingTableEntry rte(destRouter);