nlsr: removed references to ndn-cxx/common aliases and improved namespacing

Change-Id: I65e4691305b0157f334fc68d96998c119ef8b03b
refs: #3406
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index b82346f..f2a8302 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -31,8 +31,6 @@
 
 INIT_LOGGER("AdjacencyList");
 
-using namespace std;
-
 AdjacencyList::AdjacencyList()
 {
 }
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index c21e70b..66a2710 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -23,10 +23,10 @@
 #define NLSR_ADJACENCY_LIST_HPP
 
 #include "adjacent.hpp"
+#include "common.hpp"
 
 #include <list>
 #include <boost/cstdint.hpp>
-#include <ndn-cxx/common.hpp>
 
 namespace nlsr {
 
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index c43a070..5a4d709 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -32,9 +32,6 @@
 
 INIT_LOGGER("SyncLogicHandler");
 
-using namespace ndn;
-using namespace std;
-
 const std::string NLSR_COMPONENT = "NLSR";
 const std::string LSA_COMPONENT = "LSA";
 
@@ -75,9 +72,8 @@
   // of the object
   std::shared_ptr<ndn::Face> facePtr(&m_syncFace, NullDeleter<ndn::Face>());
 
-
   m_syncSocket = std::make_shared<chronosync::Socket>(m_syncPrefix, m_nameLsaUserPrefix, *facePtr,
-                                                      bind(&SyncLogicHandler::onChronoSyncUpdate, this, _1));
+                                                      std::bind(&SyncLogicHandler::onChronoSyncUpdate, this, _1));
 
   if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
     m_syncSocket->addSyncNode(m_adjLsaUserPrefix);
@@ -88,7 +84,7 @@
 }
 
 void
-SyncLogicHandler::onChronoSyncUpdate(const vector<chronosync::MissingDataInfo>& v)
+SyncLogicHandler::onChronoSyncUpdate(const std::vector<chronosync::MissingDataInfo>& v)
 {
   _LOG_DEBUG("Received ChronoSync update event");
 
@@ -224,7 +220,7 @@
   _LOG_DEBUG("Publishing Sync Update. Prefix: " << updatePrefix << " Seq No: " << seqNo);
 
   ndn::Name updateName(updatePrefix);
-  string data("NoData");
+  std::string data("NoData");
 
   m_syncSocket->publishData(reinterpret_cast<const uint8_t*>(data.c_str()), data.size(),
                             ndn::time::milliseconds(1000), seqNo, updateName);
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index e48158c..8359d37 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -25,22 +25,16 @@
 #include "utility/name-helper.hpp"
 #include "update/prefix-update-processor.hpp"
 
-#include <iostream>
-#include <fstream>
+#include <boost/cstdint.hpp>
 
 #include <ndn-cxx/name.hpp>
 #include <ndn-cxx/util/face-uri.hpp>
 
-// boost needs to be included after ndn-cxx, otherwise there will be conflict with _1, _2, ...
-#include <boost/algorithm/string.hpp>
-#include <boost/property_tree/info_parser.hpp>
-#include <boost/property_tree/ptree.hpp>
-#include <boost/filesystem.hpp>
+#include <iostream>
+#include <fstream>
 
 namespace nlsr {
 
-using namespace std;
-
 template <class T>
 class ConfigurationVariable
 {
@@ -144,12 +138,12 @@
 ConfFileProcessor::processConfFile()
 {
   bool ret = true;
-  ifstream inputFile;
+  std::ifstream inputFile;
   inputFile.open(m_confFileName.c_str());
   if (!inputFile.is_open()) {
-    string msg = "Failed to read configuration file: ";
+    std::string msg = "Failed to read configuration file: ";
     msg += m_confFileName;
-    cerr << msg << endl;
+    std::cerr << msg << std::endl;
     return false;
   }
   ret = load(inputFile);
@@ -158,7 +152,7 @@
 }
 
 bool
-ConfFileProcessor::load(istream& input)
+ConfFileProcessor::load(std::istream& input)
 {
   ConfigSection pt;
   bool ret = true;
@@ -166,7 +160,7 @@
     boost::property_tree::read_info(input, pt);
   }
   catch (const boost::property_tree::info_parser_error& error) {
-    stringstream msg;
+    std::stringstream msg;
     std::cerr << "Failed to parse configuration file " << std::endl;
     std::cerr << m_confFileName << std::endl;
     return false;
@@ -221,15 +215,15 @@
 ConfFileProcessor::processConfSectionGeneral(const ConfigSection& section)
 {
   try {
-    std::string network = section.get<string>("network");
-    std::string site = section.get<string>("site");
-    std::string router = section.get<string>("router");
+    std::string network = section.get<std::string>("network");
+    std::string site = section.get<std::string>("site");
+    std::string router = section.get<std::string>("router");
     ndn::Name networkName(network);
     if (!networkName.empty()) {
       m_nlsr.getConfParameter().setNetwork(networkName);
     }
     else {
-      cerr << " Network can not be null or empty or in bad URI format :(!" << endl;
+      std::cerr << " Network can not be null or empty or in bad URI format :(!" << std::endl;
       return false;
     }
     ndn::Name siteName(site);
@@ -237,7 +231,7 @@
       m_nlsr.getConfParameter().setSiteName(siteName);
     }
     else {
-      cerr << "Site can not be null or empty or in bad URI format:( !" << endl;
+      std::cerr << "Site can not be null or empty or in bad URI format:( !" << std::endl;
       return false;
     }
     ndn::Name routerName(router);
@@ -245,12 +239,12 @@
       m_nlsr.getConfParameter().setRouterName(routerName);
     }
     else {
-      cerr << " Router name can not be null or empty or in bad URI format:( !" << endl;
+      std::cerr << " Router name can not be null or empty or in bad URI format:( !" << std::endl;
       return false;
     }
   }
   catch (const std::exception& ex) {
-    cerr << ex.what() << endl;
+    std::cerr << ex.what() << std::endl;
     return false;
   }
 
@@ -294,7 +288,7 @@
   }
 
   // log-level
-  std::string logLevel = section.get<string>("log-level", "INFO");
+  std::string logLevel = section.get<std::string>("log-level", "INFO");
 
   if (isValidLogLevel(logLevel)) {
     m_nlsr.getConfParameter().setLogLevel(logLevel);
@@ -306,11 +300,11 @@
   }
 
   try {
-    std::string logDir = section.get<string>("log-dir");
+    std::string logDir = section.get<std::string>("log-dir");
     if (boost::filesystem::exists(logDir)) {
       if (boost::filesystem::is_directory(logDir)) {
         std::string testFileName=logDir+"/test.log";
-        ofstream testOutFile;
+        std::ofstream testOutFile;
         testOutFile.open(testFileName.c_str());
         if (testOutFile.is_open() && testOutFile.good()) {
           m_nlsr.getConfParameter().setLogDir(logDir);
@@ -340,11 +334,11 @@
   }
 
   try {
-    std::string seqDir = section.get<string>("seq-dir");
+    std::string seqDir = section.get<std::string>("seq-dir");
     if (boost::filesystem::exists(seqDir)) {
       if (boost::filesystem::is_directory(seqDir)) {
         std::string testFileName=seqDir+"/test.seq";
-        ofstream testOutFile;
+        std::ofstream testOutFile;
         testOutFile.open(testFileName.c_str());
         if (testOutFile.is_open() && testOutFile.good()) {
           m_nlsr.getConfParameter().setSeqFileDir(seqDir);
@@ -374,7 +368,7 @@
   }
 
   try {
-    std::string log4cxxPath = section.get<string>("log4cxx-conf");
+    std::string log4cxxPath = section.get<std::string>("log4cxx-conf");
 
     if (log4cxxPath == "") {
       std::cerr << "No value provided for log4cxx-conf" << std::endl;
@@ -533,7 +527,7 @@
 ConfFileProcessor::processConfSectionHyperbolic(const ConfigSection& section)
 {
   // state
-  std::string state = section.get<string>("state", "off");
+  std::string state = section.get<std::string>("state", "off");
 
   if (boost::iequals(state, "off")) {
     m_nlsr.getConfParameter().setHyperbolicState(HYPERBOLIC_STATE_OFF);
diff --git a/src/conf-file-processor.hpp b/src/conf-file-processor.hpp
index 1f0918a..d3e91c9 100644
--- a/src/conf-file-processor.hpp
+++ b/src/conf-file-processor.hpp
@@ -21,11 +21,12 @@
 #ifndef NLSR_CONF_FILE_PROCESSOR_HPP
 #define NLSR_CONF_FILE_PROCESSOR_HPP
 
+#include "common.hpp"
 #include "nlsr.hpp"
 
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/property_tree/ptree.hpp>
-#include <boost/cstdint.hpp>
+#include <boost/algorithm/string.hpp>
+#include <boost/property_tree/info_parser.hpp>
+#include <boost/filesystem.hpp>
 
 namespace nlsr {
 
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index 29f9f9c..00aa06a 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -22,11 +22,11 @@
 #ifndef NLSR_CONF_PARAMETER_HPP
 #define NLSR_CONF_PARAMETER_HPP
 
+#include "common.hpp"
 #include "logger.hpp"
 
 #include <iostream>
 #include <boost/cstdint.hpp>
-#include <ndn-cxx/common.hpp>
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/util/time.hpp>
 
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 7ecad7a..440c2ba 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -38,8 +38,6 @@
 
 INIT_LOGGER("Lsa");
 
-using namespace std;
-
 const std::string NameLsa::TYPE_STRING = "name";
 const std::string AdjLsa::TYPE_STRING = "adjacency";
 const std::string CoordinateLsa::TYPE_STRING = "coordinate";
@@ -65,7 +63,7 @@
   }
 }
 
-string
+std::string
 NameLsa::getData()
 {
   std::ostringstream os;
@@ -172,7 +170,7 @@
           std::numeric_limits<double>::epsilon());
 }
 
-string
+std::string
 CoordinateLsa::getData()
 {
   std::ostringstream os;
@@ -266,7 +264,7 @@
   return m_adl == alsa.getAdl();
 }
 
-string
+std::string
 AdjLsa::getData()
 {
   std::ostringstream os;
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 5cfc783..3fed788 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -59,7 +59,8 @@
 
 const ndn::Name::Component Lsdb::NAME_COMPONENT = ndn::Name::Component("lsdb");
 const ndn::time::seconds Lsdb::GRACE_PERIOD = ndn::time::seconds(10);
-const steady_clock::TimePoint Lsdb::DEFAULT_LSA_RETRIEVAL_DEADLINE = steady_clock::TimePoint::min();
+const ndn::time::steady_clock::TimePoint Lsdb::DEFAULT_LSA_RETRIEVAL_DEADLINE =
+  ndn::time::steady_clock::TimePoint::min();
 
 Lsdb::Lsdb(Nlsr& nlsr, ndn::Scheduler& scheduler)
   : m_nlsr(nlsr)
@@ -800,7 +801,7 @@
 }
 
 void
-Lsdb::setLsaRefreshTime(const seconds& lsaRefreshTime)
+Lsdb::setLsaRefreshTime(const ndn::time::seconds& lsaRefreshTime)
 {
   m_lsaRefreshTime = lsaRefreshTime;
 }
@@ -957,13 +958,13 @@
 
 void
 Lsdb::expressInterest(const ndn::Name& interestName, uint32_t timeoutCount,
-                      steady_clock::TimePoint deadline)
+                      ndn::time::steady_clock::TimePoint deadline)
 {
   // increment SENT_LSA_INTEREST
   lsaIncrementSignal(Statistics::PacketType::SENT_LSA_INTEREST);
 
   if (deadline == DEFAULT_LSA_RETRIEVAL_DEADLINE) {
-    deadline = steady_clock::now() + ndn::time::seconds(static_cast<int>(LSA_REFRESH_TIME_MAX));
+    deadline = ndn::time::steady_clock::now() + ndn::time::seconds(static_cast<int>(LSA_REFRESH_TIME_MAX));
   }
   // The first component of the interest is the name.
   ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index bb0b9d8..8d01155 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -42,9 +42,12 @@
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/util/time.hpp>
 
-namespace nlsr {
+#include <utility>
+#include <boost/cstdint.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/time.hpp>
 
-using namespace ndn::time;
+namespace nlsr {
 
 class Nlsr;
 
@@ -206,14 +209,14 @@
   writeAdjLsdbLog();
 
   void
-  setLsaRefreshTime(const seconds& lsaRefreshTime);
+  setLsaRefreshTime(const ndn::time::seconds& lsaRefreshTime);
 
   void
   setThisRouterPrefix(std::string trp);
 
   void
   expressInterest(const ndn::Name& interestName, uint32_t timeoutCount,
-                  steady_clock::TimePoint deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE);
+                  ndn::time::steady_clock::TimePoint deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE);
 
   void
   processInterest(const ndn::Name& name, const ndn::Interest& interest);
@@ -272,7 +275,7 @@
    */
   ndn::EventId
   scheduleNameLsaExpiration(const ndn::Name& key, int seqNo,
-                            const seconds& expTime);
+                            const ndn::time::seconds& expTime);
 
   /*! \brief Either allow to expire, or refresh a name LSA.
     \param lsaKey The name of the router that published the LSA.
@@ -289,7 +292,7 @@
   */
   ndn::EventId
   scheduleAdjLsaExpiration(const ndn::Name& key, int seqNo,
-                           const seconds& expTime);
+                           const ndn::time::seconds& expTime);
 
 private:
 
@@ -298,7 +301,7 @@
 
   ndn::EventId
   scheduleCoordinateLsaExpiration(const ndn::Name& key, int seqNo,
-                                  const seconds& expTime);
+                                  const ndn::time::seconds& expTime);
 
   void
   expireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
@@ -372,7 +375,7 @@
   afterFetchLsa(const ndn::ConstBufferPtr& data, ndn::Name& interestName);
 
 private:
-  system_clock::TimePoint
+  ndn::time::system_clock::TimePoint
   getLsaExpirationTimePoint();
 
   /*! \brief Cancels an event in the event scheduler. */
@@ -393,7 +396,7 @@
   std::list<AdjLsa> m_adjLsdb;
   std::list<CoordinateLsa> m_corLsdb;
 
-  seconds m_lsaRefreshTime;
+  ndn::time::seconds m_lsaRefreshTime;
   std::string m_thisRouterPrefix;
 
   typedef std::map<ndn::Name, uint64_t> SequenceNumberMap;
@@ -403,7 +406,7 @@
   SequenceNumberMap m_highestSeqNo;
 
   static const ndn::time::seconds GRACE_PERIOD;
-  static const steady_clock::TimePoint DEFAULT_LSA_RETRIEVAL_DEADLINE;
+  static const ndn::time::steady_clock::TimePoint DEFAULT_LSA_RETRIEVAL_DEADLINE;
 
   ndn::time::seconds m_adjLsaBuildInterval;
 
diff --git a/src/name-prefix-list.cpp b/src/name-prefix-list.cpp
index 742367b..7df0eef 100644
--- a/src/name-prefix-list.cpp
+++ b/src/name-prefix-list.cpp
@@ -20,21 +20,16 @@
  **/
 
 #include "name-prefix-list.hpp"
-
 #include "common.hpp"
 #include "logger.hpp"
 
 #include <iostream>
 #include <algorithm>
 
-#include <ndn-cxx/common.hpp>
-
 namespace nlsr {
 
 INIT_LOGGER("NamePrefixList");
 
-using namespace std;
-
 NamePrefixList::NamePrefixList()
 {
 }
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 70648e3..32bda23 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -37,9 +37,6 @@
 
 const ndn::Name Nlsr::LOCALHOST_PREFIX = ndn::Name("/localhost/nlsr");
 
-using namespace ndn;
-using namespace std;
-
 Nlsr::Nlsr(boost::asio::io_service& ioService, ndn::Scheduler& scheduler, ndn::Face& face, ndn::KeyChain& keyChain)
   : m_nlsrFace(face)
   , m_scheduler(scheduler)
@@ -303,13 +300,13 @@
   std::shared_ptr<ndn::IdentityCertificate> certificate =
     std::make_shared<ndn::IdentityCertificate>();
   std::shared_ptr<ndn::PublicKey> pubKey = m_keyChain.getPublicKey(keyName);
-  Name certificateName = keyName.getPrefix(-1);
+  ndn::Name certificateName = keyName.getPrefix(-1);
   certificateName.append("KEY").append(keyName.get(-1)).append("ID-CERT").appendVersion();
   certificate->setName(certificateName);
-  certificate->setNotBefore(time::system_clock::now() - time::days(1));
-  certificate->setNotAfter(time::system_clock::now() + time::days(7300)); // ~20 years
+  certificate->setNotBefore(ndn::time::system_clock::now() - ndn::time::days(1));
+  certificate->setNotAfter(ndn::time::system_clock::now() + ndn::time::days(7300)); // ~20 years
   certificate->setPublicKeyInfo(*pubKey);
-  certificate->addSubjectDescription(CertificateSubjectDescription(ndn::oid::ATTRIBUTE_NAME,
+  certificate->addSubjectDescription(ndn::CertificateSubjectDescription(ndn::oid::ATTRIBUTE_NAME,
                                                                    keyName.toUri()));
   certificate->encode();
   m_keyChain.signByIdentity(*certificate, m_confParam.getRouterPrefix());
diff --git a/src/route/fib-entry.cpp b/src/route/fib-entry.cpp
index ccbb887..91eb422 100644
--- a/src/route/fib-entry.cpp
+++ b/src/route/fib-entry.cpp
@@ -25,8 +25,6 @@
 
 INIT_LOGGER("FibEntry");
 
-using namespace std;
-
 void
 FibEntry::writeLog()
 {
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index de73310..592b2bd 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -35,9 +35,6 @@
 
 const uint64_t Fib::GRACE_PERIOD = 10;
 
-using namespace std;
-using namespace ndn;
-
 void
 Fib::remove(const ndn::Name& name)
 {
diff --git a/src/route/map.cpp b/src/route/map.cpp
index 544976e..5596a05 100644
--- a/src/route/map.cpp
+++ b/src/route/map.cpp
@@ -23,7 +23,6 @@
 #include "adjacent.hpp"
 #include "lsa.hpp"
 #include "lsdb.hpp"
-
 #include "logger.hpp"
 
 #include <iostream>
@@ -33,8 +32,6 @@
 
 INIT_LOGGER("Map");
 
-using namespace std;
-
 static bool
 mapEntryCompareByRouter(MapEntry& mpe1, const ndn::Name& rtrName)
 {
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp
index c2e5fa6..97a89b0 100644
--- a/src/route/nexthop-list.cpp
+++ b/src/route/nexthop-list.cpp
@@ -18,9 +18,8 @@
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
-
-#include "common.hpp"
 #include "nexthop-list.hpp"
+#include "common.hpp"
 #include "nexthop.hpp"
 #include "logger.hpp"
 
@@ -28,8 +27,6 @@
 
 INIT_LOGGER("NexthopList");
 
-using namespace std;
-
 static bool
 nexthopAddCompare(const NextHop& nh1, const NextHop& nh2)
 {
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index 7aa6f48..f4442f5 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -18,23 +18,21 @@
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
-
-#include <iostream>
-#include <cmath>
-#include "lsdb.hpp"
 #include "routing-table-calculator.hpp"
+#include "lsdb.hpp"
 #include "map.hpp"
 #include "lsa.hpp"
 #include "nexthop.hpp"
 #include "nlsr.hpp"
 #include "logger.hpp"
 
+#include <iostream>
 #include <boost/math/constants/constants.hpp>
+#include <cmath>
 
 namespace nlsr {
 
 INIT_LOGGER("RoutingTableCalculator");
-using namespace std;
 
 void
 RoutingTableCalculator::allocateAdjMatrix()
@@ -120,7 +118,7 @@
 RoutingTableCalculator::writeAdjMatrixLog()
 {
   for (size_t i = 0; i < m_nRouters; i++) {
-    string line="";
+    std::string line="";
     for (size_t j = 0; j < m_nRouters; j++) {
       line += boost::lexical_cast<std::string>(adjMatrix[i][j]);
       line += " ";
@@ -252,7 +250,7 @@
   int v, u;
   int* Q = new int[m_nRouters]; // Each cell represents the router with that mapping no.
   int head = 0;
-  // Initiate the Parent
+  // Initiate the parent
   for (i = 0 ; i < static_cast<int>(m_nRouters); i++) {
     m_parent[i] = EMPTY_PARENT;
     // Array where the ith element is the distance to the router with mapping no i.
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 708e3dd..238852a 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -17,7 +17,6 @@
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
-
 #include "routing-table.hpp"
 #include "nlsr.hpp"
 #include "map.hpp"
@@ -28,15 +27,13 @@
 #include "logger.hpp"
 
 #include <iostream>
-#include <string>
 #include <list>
+#include <string>
 
 namespace nlsr {
 
 INIT_LOGGER("RoutingTable");
 
-using namespace std;
-
 void
 RoutingTable::calculate(Nlsr& pnlsr)
 {
diff --git a/src/sequencing-manager.cpp b/src/sequencing-manager.cpp
index 6eaab5d..810be68 100644
--- a/src/sequencing-manager.cpp
+++ b/src/sequencing-manager.cpp
@@ -19,6 +19,9 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
+#include "sequencing-manager.hpp"
+#include "logger.hpp"
+
 #include <string>
 #include <iostream>
 #include <fstream>
@@ -27,15 +30,10 @@
 #include <unistd.h>
 #include <boost/algorithm/string.hpp>
 
-#include "sequencing-manager.hpp"
-#include "logger.hpp"
-
 namespace nlsr {
 
 INIT_LOGGER("SequencingManager");
 
-using namespace std;
-
 void
 SequencingManager::writeSeqNoToFile() const
 {
@@ -112,12 +110,12 @@
 }
 
 void
-SequencingManager::setSeqFileDirectory(string filePath)
+SequencingManager::setSeqFileDirectory(std::string filePath)
 {
   m_seqFileNameWithPath = filePath;
 
   if (m_seqFileNameWithPath.empty()) {
-    string homeDirPath(getpwuid(getuid())->pw_dir);
+    std::string homeDirPath(getpwuid(getuid())->pw_dir);
     if (homeDirPath.empty()) {
       homeDirPath = getenv("HOME");
     }
diff --git a/tests/test-adjacency-list.cpp b/tests/test-adjacency-list.cpp
index 9a46a1c..465fd9a 100644
--- a/tests/test-adjacency-list.cpp
+++ b/tests/test-adjacency-list.cpp
@@ -19,8 +19,9 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
-#include "adjacency-list.hpp"
+#include "common.hpp"
 
+#include "adjacency-list.hpp"
 #include "adjacent.hpp"
 #include "conf-parameter.hpp"
 
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 2dd6f3e..49501bf 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -123,8 +123,8 @@
   BOOST_CHECK_EQUAL(it->getName(), oldInterestName);
   interests.clear();
 
-  steady_clock::TimePoint deadline = steady_clock::now() +
-                                     ndn::time::seconds(LSA_REFRESH_TIME_MAX);
+  ndn::time::steady_clock::TimePoint deadline = ndn::time::steady_clock::now() +
+    ndn::time::seconds(LSA_REFRESH_TIME_MAX);
 
   // Simulate an LSA interest timeout
   lsdb.onFetchLsaError(ndn::util::SegmentFetcher::ErrorCode::INTEREST_TIMEOUT, "Timeout",
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 32cacb5..42d9fa0 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -169,7 +169,7 @@
     lsaInterestName.append(sessionTime);
     lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 
-    shared_ptr<Interest> lsaInterest = make_shared<Interest>(lsaInterestName);
+    std::shared_ptr<Interest> lsaInterest = std::make_shared<Interest>(lsaInterestName);
 
     face.receive(*lsaInterest);
     this->advanceClocks(ndn::time::milliseconds(10));