diff --git a/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
index a76aaed..0592040 100644
--- a/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
+++ b/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,10 +44,17 @@
   , m_commandOptions(options)
   , m_controlParameters(parameters)
 {
-  m_ribInsertConn = rib.afterInsertEntry.connect(
-    std::bind(&NfdRibReadvertiseDestination::handleRibInsert, this, _1));
-  m_ribEraseConn = rib.afterEraseEntry.connect(
-    std::bind(&NfdRibReadvertiseDestination::handleRibErase, this, _1));
+  m_ribInsertConn = rib.afterInsertEntry.connect([this] (const Name& name) {
+    if (name.isPrefixOf(m_commandOptions.getPrefix())) {
+      setAvailability(true);
+    }
+  });
+
+  m_ribEraseConn = rib.afterEraseEntry.connect([this] (const Name& name) {
+    if (name.isPrefixOf(m_commandOptions.getPrefix())) {
+      setAvailability(false);
+    }
+  });
 }
 
 void
@@ -59,7 +66,7 @@
 
   m_controller.start<ndn::nfd::RibRegisterCommand>(
     getControlParameters().setName(rr.prefix),
-    [=] (const ControlParameters& cp) { successCb(); },
+    [=] (const ControlParameters&) { successCb(); },
     [=] (const ControlResponse& cr) { failureCb(cr.getText()); },
     getCommandOptions().setSigningInfo(rr.signer));
 }
@@ -73,38 +80,10 @@
 
   m_controller.start<ndn::nfd::RibUnregisterCommand>(
     getControlParameters().setName(rr.prefix),
-    [=] (const ControlParameters& cp) { successCb(); },
+    [=] (const ControlParameters&) { successCb(); },
     [=] (const ControlResponse& cr) { failureCb(cr.getText()); },
     getCommandOptions().setSigningInfo(rr.signer));
 }
 
-ndn::nfd::ControlParameters
-NfdRibReadvertiseDestination::getControlParameters()
-{
-  return m_controlParameters;
-}
-
-ndn::nfd::CommandOptions
-NfdRibReadvertiseDestination::getCommandOptions()
-{
-  return m_commandOptions;
-}
-
-void
-NfdRibReadvertiseDestination::handleRibInsert(const ndn::Name& name)
-{
-  if (name.isPrefixOf(m_commandOptions.getPrefix())) {
-    setAvailability(true);
-  }
-}
-
-void
-NfdRibReadvertiseDestination::handleRibErase(const ndn::Name& name)
-{
-  if (name.isPrefixOf(m_commandOptions.getPrefix())) {
-    setAvailability(false);
-  }
-}
-
 } // namespace rib
 } // namespace nfd
diff --git a/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
index 9c5bce6..0f61669 100644
--- a/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
+++ b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -45,8 +45,7 @@
                                Rib& rib,
                                const ndn::nfd::CommandOptions& options = ndn::nfd::CommandOptions(),
                                const ndn::nfd::ControlParameters& parameters =
-                                 ndn::nfd::ControlParameters()
-                                   .setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT));
+                                 ndn::nfd::ControlParameters().setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT));
 
   /** \brief add a name prefix into NFD RIB
    */
@@ -64,17 +63,16 @@
 
 protected:
   ndn::nfd::ControlParameters
-  getControlParameters();
+  getControlParameters() const
+  {
+    return m_controlParameters;
+  }
 
   ndn::nfd::CommandOptions
-  getCommandOptions();
-
-private:
-  void
-  handleRibInsert(const Name& name);
-
-  void
-  handleRibErase(const Name& name);
+  getCommandOptions() const
+  {
+    return m_commandOptions;
+  }
 
 private:
   ndn::nfd::Controller& m_controller;
