src: Remove unnecessary uses of boost::cref in make_shared and replace boost::cref/boost::ref with just cref/ref
In some cases, due to argument-dependent lookup, it is necessary to use
ndn::ref, instead of just ref.
Change-Id: I682180a007609535855f77511b49622154ad4f11
Refs: #1591
diff --git a/daemon/fw/available-strategies.cpp b/daemon/fw/available-strategies.cpp
index fce0fc5..c6f7d42 100644
--- a/daemon/fw/available-strategies.cpp
+++ b/daemon/fw/available-strategies.cpp
@@ -33,7 +33,7 @@
shared_ptr<Strategy>
makeDefaultStrategy(Forwarder& forwarder)
{
- return make_shared<BestRouteStrategy>(boost::ref(forwarder));
+ return make_shared<BestRouteStrategy>(ref(forwarder));
}
template<typename S>
@@ -42,7 +42,7 @@
{
StrategyChoice& strategyChoice = forwarder.getStrategyChoice();
if (!strategyChoice.hasStrategy(S::STRATEGY_NAME)) {
- strategyChoice.install(make_shared<S>(boost::ref(forwarder)));
+ strategyChoice.install(make_shared<S>(ref(forwarder)));
}
}
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index ce66a89..ec9deb6 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -58,9 +58,9 @@
" local=" << face->getLocalUri());
face->onReceiveInterest += bind(&Forwarder::onInterest,
- &m_forwarder, boost::ref(*face), _1);
+ &m_forwarder, ref(*face), _1);
face->onReceiveData += bind(&Forwarder::onData,
- &m_forwarder, boost::ref(*face), _1);
+ &m_forwarder, ref(*face), _1);
face->onFail += bind(&FaceTable::remove,
this, face);
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 6b06d10..4c8aa36 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -105,7 +105,7 @@
// dispatch to strategy
this->dispatchToStrategy(pitEntry, bind(&Strategy::afterReceiveInterest, _1,
- boost::cref(inFace), boost::cref(interest), fibEntry, pitEntry));
+ cref(inFace), cref(interest), fibEntry, pitEntry));
}
void
@@ -191,7 +191,7 @@
// invoke PIT unsatisfied callback
this->dispatchToStrategy(pitEntry, bind(&Strategy::beforeExpirePendingInterest, _1,
- pitEntry));
+ pitEntry));
// PIT delete
m_pit.erase(pitEntry);
@@ -254,7 +254,7 @@
// invoke PIT satisfy callback
this->dispatchToStrategy(pitEntry, bind(&Strategy::beforeSatisfyPendingInterest, _1,
- pitEntry, boost::cref(inFace), boost::cref(data)));
+ pitEntry, cref(inFace), cref(data)));
}
// foreach pending downstream