Refactor and modernize namespace declarations
Move all unit tests to namespace nfd::tests
Delete unused header core/algorithm.hpp
Change-Id: I5591f0c5f3bb5db67f8b45fae95471f8a555ca68
diff --git a/tools/ndn-autoconfig-server/main.cpp b/tools/ndn-autoconfig-server/main.cpp
index c281148..38b4f32 100644
--- a/tools/ndn-autoconfig-server/main.cpp
+++ b/tools/ndn-autoconfig-server/main.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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,9 +31,7 @@
#include <boost/exception/diagnostic_information.hpp>
-namespace ndn {
-namespace tools {
-namespace autoconfig_server {
+namespace ndn::autoconfig_server {
static void
usage(const char* programName)
@@ -93,12 +91,10 @@
return 0;
}
-} // namespace autoconfig_server
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig_server
int
main(int argc, char** argv)
{
- return ndn::tools::autoconfig_server::main(argc, argv);
+ return ndn::autoconfig_server::main(argc, argv);
}
diff --git a/tools/ndn-autoconfig-server/program.cpp b/tools/ndn-autoconfig-server/program.cpp
index 82c1497..542d91a 100644
--- a/tools/ndn-autoconfig-server/program.cpp
+++ b/tools/ndn-autoconfig-server/program.cpp
@@ -31,9 +31,7 @@
#include <iostream>
-namespace ndn {
-namespace tools {
-namespace autoconfig_server {
+namespace ndn::autoconfig_server {
const Name HUB_DATA_NAME("/localhop/ndn-autoconf/hub");
const Name ROUTABLE_PREFIXES_DATA_PREFIX("/localhop/nfd");
@@ -97,6 +95,4 @@
m_face.shutdown();
}
-} // namespace autoconfig_server
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig_server
diff --git a/tools/ndn-autoconfig-server/program.hpp b/tools/ndn-autoconfig-server/program.hpp
index 39b5bce..03d5e20 100644
--- a/tools/ndn-autoconfig-server/program.hpp
+++ b/tools/ndn-autoconfig-server/program.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,14 +26,12 @@
#ifndef NFD_TOOLS_NDN_AUTOCONFIG_SERVER_PROGRAM_HPP
#define NFD_TOOLS_NDN_AUTOCONFIG_SERVER_PROGRAM_HPP
-#include "core/common.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/security/key-chain.hpp>
-namespace ndn {
-namespace tools {
-namespace autoconfig_server {
+namespace ndn::autoconfig_server {
struct Options
{
@@ -68,8 +66,6 @@
mgmt::Dispatcher m_dispatcher;
};
-} // namespace autoconfig_server
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig_server
#endif // NFD_TOOLS_NDN_AUTOCONFIG_SERVER_PROGRAM_HPP