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/rib/main.cpp b/rib/main.cpp
index d74ed8d..75771b7 100644
--- a/rib/main.cpp
+++ b/rib/main.cpp
@@ -195,7 +195,7 @@
{
/// \todo May be try to reload config file
signalSet.async_wait(bind(&Nrd::terminate, this, _1, _2,
- boost::ref(signalSet)));
+ ref(signalSet)));
}
}
@@ -259,7 +259,7 @@
signalSet.add(SIGUSR1);
signalSet.add(SIGUSR2);
signalSet.async_wait(bind(&Nrd::terminate, &nrdInstance, _1, _2,
- boost::ref(signalSet)));
+ ndn::ref(signalSet)));
try {
nfd::getGlobalIoService().run();
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 73ef71d..f4fc9c8 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -57,14 +57,8 @@
),
};
-inline static void
-NullDeleter(boost::asio::io_service* variable)
-{
- // do nothing
-}
-
RibManager::RibManager()
- : m_face(shared_ptr<boost::asio::io_service>(&getGlobalIoService(), &NullDeleter))
+ : m_face(getGlobalIoService())
, m_nfdController(new ndn::nfd::Controller(m_face))
, m_localhostValidator(m_face)
, m_localhopValidator(m_face)
@@ -96,7 +90,7 @@
}
NFD_LOG_INFO("Start monitoring face create/destroy events");
- m_faceMonitor.addSubscriber(boost::bind(&RibManager::onNotification, this, _1));
+ m_faceMonitor.addSubscriber(bind(&RibManager::onNotification, this, _1));
m_faceMonitor.startNotifications();
}
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index 1d542fb..ef38ae1 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.hpp
@@ -149,9 +149,9 @@
FaceMonitor m_faceMonitor;
bool m_isLocalhopEnabled;
- typedef boost::function<void(RibManager*,
- const shared_ptr<const Interest>& request,
- ControlParameters& parameters)> VerbProcessor;
+ typedef function<void(RibManager*,
+ const shared_ptr<const Interest>& request,
+ ControlParameters& parameters)> VerbProcessor;
typedef std::map<name::Component, VerbProcessor> VerbDispatchTable;