core: slim down `common.hpp`

Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index d09c7df..785c8ed 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -588,7 +588,7 @@
   SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
 
   // Now add a real interface: both channel and multicast face should be created successfully.
-  netmon->addInterface(const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
+  netmon->addInterface(std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
   BOOST_CHECK_EQUAL(factory.getChannels().size(), 2);
   auto etherMcastFaces = this->listEtherMcastFaces();
   BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), 1);
@@ -613,7 +613,7 @@
   BOOST_CHECK_EQUAL(this->listEtherMcastFaces().size(), 0);
 
   // Add an interface that satisfies only the unicast criteria.
-  auto netif = const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
+  auto netif = std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
   netif->setFlags(netif->getFlags() & ~IFF_MULTICAST);
   netmon->addInterface(netif);
   checkChannelListEqual(factory, {FaceUri::fromDev(netifs.front()->getName()).toString()});
@@ -659,7 +659,7 @@
   parseConfig("", false);
   g_io.poll();
 
-  netmon->addInterface(const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
+  netmon->addInterface(std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
   BOOST_CHECK_EQUAL(factory.getChannels().size(), 0);
   BOOST_CHECK_EQUAL(this->listEtherMcastFaces().size(), 0);
 }
diff --git a/tests/daemon/face/ethernet-transport-fixture.hpp b/tests/daemon/face/ethernet-transport-fixture.hpp
index ab73795..dc157e8 100644
--- a/tests/daemon/face/ethernet-transport-fixture.hpp
+++ b/tests/daemon/face/ethernet-transport-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,7 +40,7 @@
   EthernetTransportFixture()
   {
     if (!netifs.empty()) {
-      defaultNetif = const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
+      defaultNetif = std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
     }
   }
 
@@ -52,7 +52,7 @@
   {
     for (const auto& netif : netifs) {
       if (netif->getState() == ndn::net::InterfaceState::RUNNING) {
-        return const_pointer_cast<ndn::net::NetworkInterface>(netif);
+        return std::const_pointer_cast<ndn::net::NetworkInterface>(netif);
       }
     }
 
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 55d601c..3d04940 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -1188,7 +1188,7 @@
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
   BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
 
-  netmon->addInterface(const_pointer_cast<NetworkInterface>(netifsV4.front()));
+  netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifsV4.front()));
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 1);
   BOOST_CHECK_LE(this->listUdp6McastFaces().size(), 1);
 }
@@ -1211,7 +1211,7 @@
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
   BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
 
-  netmon->addInterface(const_pointer_cast<NetworkInterface>(netifsV6.front()));
+  netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifsV6.front()));
   BOOST_CHECK_LE(this->listUdp4McastFaces().size(), 1);
   BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 1);
 }
@@ -1278,7 +1278,7 @@
   parseConfig("", false);
   g_io.poll();
 
-  netmon->addInterface(const_pointer_cast<NetworkInterface>(netifs.front()));
+  netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifs.front()));
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
   BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
 }
diff --git a/tests/daemon/face/unix-stream-transport-fixture.hpp b/tests/daemon/face/unix-stream-transport-fixture.hpp
index 43b1ad0..253e05c 100644
--- a/tests/daemon/face/unix-stream-transport-fixture.hpp
+++ b/tests/daemon/face/unix-stream-transport-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -42,7 +42,7 @@
 using face::UnixStreamTransport;
 
 /**
- * \brief Automatically unlinks the socket file of a Unix stream acceptor
+ * \brief Automatically unlinks the socket file of a Unix stream acceptor.
  */
 class AcceptorWithCleanup : public unix_stream::acceptor
 {
@@ -51,28 +51,27 @@
   AcceptorWithCleanup(boost::asio::io_context& io, const std::string& path = "")
     : unix_stream::acceptor(io)
   {
-    this->open();
+    open();
 
     if (path.empty()) {
-      this->bind("nfd-unix-stream-test." + to_string(time::system_clock::now().time_since_epoch().count()) + ".sock");
+      bind("nfd-unix-stream-test." + std::to_string(time::system_clock::now().time_since_epoch().count()) + ".sock");
     }
     else {
-      this->bind(path);
+      bind(path);
     }
 
-    this->listen(1);
+    listen(1);
   }
 
   ~AcceptorWithCleanup()
   {
     boost::system::error_code ec;
-
-    std::string path = this->local_endpoint(ec).path();
+    std::string path = local_endpoint(ec).path();
     if (ec) {
       return;
     }
 
-    this->close(ec);
+    close(ec);
     boost::filesystem::remove(path, ec);
   }
 };