docs: simplify conf.py and fix compatibility with upcoming Sphinx 6.0
Change-Id: Iacf4a72d30babc4a7c3fab0fea619a798eff2df1
diff --git a/daemon/fw/scope-prefix.cpp b/daemon/fw/scope-prefix.cpp
deleted file mode 100644
index 7f6043b..0000000
--- a/daemon/fw/scope-prefix.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2022, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "scope-prefix.hpp"
-
-namespace nfd::scope_prefix {
-
-const Name LOCALHOST("ndn:/localhost");
-const Name LOCALHOP("ndn:/localhop");
-
-} // namespace nfd::scope_prefix
diff --git a/daemon/fw/scope-prefix.hpp b/daemon/fw/scope-prefix.hpp
index fd8796c..9b48b22 100644
--- a/daemon/fw/scope-prefix.hpp
+++ b/daemon/fw/scope-prefix.hpp
@@ -41,7 +41,7 @@
* \li Interest can come from and go to local faces only.
* \li Data can come from and go to local faces only.
*/
-extern const Name LOCALHOST;
+inline const Name LOCALHOST{"/localhost"};
/** \brief ndn:/localhop
*
@@ -55,7 +55,7 @@
*
* Data packets under prefix ndn:/localhop are unrestricted.
*/
-extern const Name LOCALHOP;
+inline const Name LOCALHOP{"/localhop"};
} // namespace nfd::scope_prefix
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index a178fe4..5cda79e 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, 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,
@@ -45,7 +45,7 @@
NFD_LOG_INIT(Nfd);
-const std::string INTERNAL_CONFIG("internal://nfd.conf");
+const std::string INTERNAL_CONFIG{"internal://nfd.conf"};
Nfd::Nfd(ndn::KeyChain& keyChain)
: m_keyChain(keyChain)
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
index 2d8d3a5..ade9f8b 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
@@ -32,8 +32,8 @@
namespace nfd::rib {
-const name::Component IGNORE_COMPONENT("nrd");
-const time::seconds DEFAULT_REFRESH_INTERVAL = 25_s;
+const name::Component IGNORE_COMPONENT{"nrd"};
+constexpr time::seconds DEFAULT_REFRESH_INTERVAL = 25_s;
HostToGatewayReadvertisePolicy::HostToGatewayReadvertisePolicy(const ndn::KeyChain& keyChain,
const ConfigSection& section)