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/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index e80c581..c2b6504 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -28,8 +28,7 @@
#include "common/global.hpp"
#include "common/logger.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_LOG_INIT(AccessStrategy);
NFD_REGISTER_STRATEGY(AccessStrategy);
@@ -278,5 +277,4 @@
return me->insertStrategyInfo<MtInfo>(m_rttEstimatorOpts).first;
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index 1aaa5ed..c33ad5c 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -33,8 +33,7 @@
#include <unordered_map>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Access Router strategy
*
@@ -173,7 +172,6 @@
signal::ScopedConnection m_removeFaceConn;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ACCESS_STRATEGY_HPP
diff --git a/daemon/fw/algorithm.cpp b/daemon/fw/algorithm.cpp
index a4d864b..a16ccc3 100644
--- a/daemon/fw/algorithm.cpp
+++ b/daemon/fw/algorithm.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,
@@ -26,8 +26,7 @@
#include "algorithm.hpp"
#include "scope-prefix.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
bool
wouldViolateScope(const Face& inFace, const Interest& interest, const Face& outFace)
@@ -151,5 +150,4 @@
return true;
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/algorithm.hpp b/daemon/fw/algorithm.hpp
index b37d540..2ff4c2c 100644
--- a/daemon/fw/algorithm.hpp
+++ b/daemon/fw/algorithm.hpp
@@ -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,
@@ -33,8 +33,7 @@
* This file contains common algorithms used by forwarding strategies.
*/
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief determine whether forwarding the Interest in \p pitEntry to \p outFace would violate scope
* \sa https://redmine.named-data.net/projects/nfd/wiki/ScopeControl
@@ -93,7 +92,6 @@
bool wantUnused = false,
time::steady_clock::TimePoint now = time::steady_clock::TimePoint::min());
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ALGORITHM_HPP
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index c49f5d5..df1f4ff 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -26,9 +26,7 @@
#include "asf-measurements.hpp"
#include "common/global.hpp"
-namespace nfd {
-namespace fw {
-namespace asf {
+namespace nfd::fw::asf {
time::nanoseconds
FaceInfo::scheduleTimeout(const Name& interestName, scheduler::EventCallback cb)
@@ -142,6 +140,4 @@
m_measurements.extendLifetime(me, MEASUREMENTS_LIFETIME);
}
-} // namespace asf
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw::asf
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index 1d2b90f..bfed7ca 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -33,9 +33,7 @@
#include <unordered_map>
-namespace nfd {
-namespace fw {
-namespace asf {
+namespace nfd::fw::asf {
/** \brief Strategy information for each face in a namespace
*/
@@ -217,8 +215,6 @@
shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
};
-} // namespace asf
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw::asf
#endif // NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 0df1712..25e0ac3 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -29,9 +29,7 @@
#include <ndn-cxx/util/random.hpp>
-namespace nfd {
-namespace fw {
-namespace asf {
+namespace nfd::fw::asf {
static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::MEASUREMENTS_LIFETIME);
@@ -178,6 +176,4 @@
}
}
-} // namespace asf
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw::asf
diff --git a/daemon/fw/asf-probing-module.hpp b/daemon/fw/asf-probing-module.hpp
index 654b569..0d6b212 100644
--- a/daemon/fw/asf-probing-module.hpp
+++ b/daemon/fw/asf-probing-module.hpp
@@ -28,9 +28,7 @@
#include "asf-measurements.hpp"
-namespace nfd {
-namespace fw {
-namespace asf {
+namespace nfd::fw::asf {
/** \brief ASF Probing Module
*/
@@ -97,8 +95,6 @@
AsfMeasurements& m_measurements;
};
-} // namespace asf
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw::asf
#endif // NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 79181a2..d4ea944 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -28,9 +28,7 @@
#include "common/global.hpp"
#include "common/logger.hpp"
-namespace nfd {
-namespace fw {
-namespace asf {
+namespace nfd::fw::asf {
NFD_LOG_INIT(AsfStrategy);
NFD_REGISTER_STRATEGY(AsfStrategy);
@@ -326,6 +324,4 @@
this->rejectPendingInterest(pitEntry);
}
-} // namespace asf
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw::asf
diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp
index 95d1d71..0e6f3a2 100644
--- a/daemon/fw/asf-strategy.hpp
+++ b/daemon/fw/asf-strategy.hpp
@@ -31,8 +31,7 @@
#include "asf-probing-module.hpp"
#include "retx-suppression-exponential.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
namespace asf {
/** \brief Adaptive SRTT-based Forwarding Strategy
@@ -97,7 +96,6 @@
using asf::AsfStrategy;
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ASF_STRATEGY_HPP
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index 94f2e29..0de6265 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -27,8 +27,7 @@
#include "algorithm.hpp"
#include "common/logger.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_LOG_INIT(BestRouteStrategy);
NFD_REGISTER_STRATEGY(BestRouteStrategy);
@@ -126,5 +125,4 @@
this->processNack(nack, ingress.face, pitEntry);
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/best-route-strategy.hpp b/daemon/fw/best-route-strategy.hpp
index 5b4e27d..484ac51 100644
--- a/daemon/fw/best-route-strategy.hpp
+++ b/daemon/fw/best-route-strategy.hpp
@@ -30,8 +30,7 @@
#include "process-nack-traits.hpp"
#include "retx-suppression-exponential.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Best Route strategy
*
@@ -75,7 +74,6 @@
friend ProcessNackTraits<BestRouteStrategy>;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_BEST_ROUTE_STRATEGY_HPP
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index f49f60a..ab8e12a 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -27,8 +27,7 @@
#include "algorithm.hpp"
#include "common/logger.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_REGISTER_STRATEGY(MulticastStrategy);
@@ -111,5 +110,4 @@
// if nothing found, the interest will not be forwarded
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/multicast-strategy.hpp b/daemon/fw/multicast-strategy.hpp
index 6ff301d..6abbb38 100644
--- a/daemon/fw/multicast-strategy.hpp
+++ b/daemon/fw/multicast-strategy.hpp
@@ -29,8 +29,7 @@
#include "strategy.hpp"
#include "retx-suppression-exponential.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief A forwarding strategy that forwards Interests to all FIB nexthops
*/
@@ -55,7 +54,6 @@
std::unique_ptr<RetxSuppressionExponential> m_retxSuppression;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_MULTICAST_STRATEGY_HPP
diff --git a/daemon/fw/process-nack-traits.cpp b/daemon/fw/process-nack-traits.cpp
index 80e5c40..4b4fbbc 100644
--- a/daemon/fw/process-nack-traits.cpp
+++ b/daemon/fw/process-nack-traits.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,
@@ -26,8 +26,7 @@
#include "process-nack-traits.hpp"
#include "common/logger.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_LOG_INIT(ProcessNackTraits);
@@ -82,5 +81,4 @@
this->sendNacksForProcessNackTraits(pitEntry, outNack);
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/process-nack-traits.hpp b/daemon/fw/process-nack-traits.hpp
index c07537b..6a98da4 100644
--- a/daemon/fw/process-nack-traits.hpp
+++ b/daemon/fw/process-nack-traits.hpp
@@ -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,
@@ -28,8 +28,7 @@
#include "strategy.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Provides a common procedure for processing Nacks
*
@@ -95,7 +94,6 @@
S* m_strategy;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_PROCESS_NACK_TRAITS_HPP
diff --git a/daemon/fw/random-strategy.cpp b/daemon/fw/random-strategy.cpp
index 2ab24c9..b4950e7 100644
--- a/daemon/fw/random-strategy.cpp
+++ b/daemon/fw/random-strategy.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,
@@ -28,8 +28,7 @@
#include <ndn-cxx/util/random.hpp>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_REGISTER_STRATEGY(RandomStrategy);
NFD_LOG_INIT(RandomStrategy);
@@ -87,5 +86,4 @@
this->processNack(nack, ingress.face, pitEntry);
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/random-strategy.hpp b/daemon/fw/random-strategy.hpp
index 27b2041..31b1e26 100644
--- a/daemon/fw/random-strategy.hpp
+++ b/daemon/fw/random-strategy.hpp
@@ -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,
@@ -29,8 +29,7 @@
#include "strategy.hpp"
#include "process-nack-traits.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief A forwarding strategy that randomly chooses a nexthop
*
@@ -59,7 +58,6 @@
friend ProcessNackTraits<RandomStrategy>;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_RANDOM_STRATEGY_HPP
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index 6158120..6d8cdcb 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.cpp
@@ -26,8 +26,7 @@
#include "retx-suppression-exponential.hpp"
#include "algorithm.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
namespace {
@@ -143,5 +142,4 @@
return make_unique<RetxSuppressionExponential>(Duration(init), Duration(max), mult);
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/retx-suppression-exponential.hpp b/daemon/fw/retx-suppression-exponential.hpp
index 41d5bdb..fd8e2c6 100644
--- a/daemon/fw/retx-suppression-exponential.hpp
+++ b/daemon/fw/retx-suppression-exponential.hpp
@@ -29,8 +29,7 @@
#include "retx-suppression.hpp"
#include "strategy.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/**
* \brief A retransmission suppression decision algorithm that suppresses
@@ -92,7 +91,6 @@
const float m_multiplier;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_RETX_SUPPRESSION_EXPONENTIAL_HPP
diff --git a/daemon/fw/retx-suppression-fixed.cpp b/daemon/fw/retx-suppression-fixed.cpp
index 790ce45..c2f190b 100644
--- a/daemon/fw/retx-suppression-fixed.cpp
+++ b/daemon/fw/retx-suppression-fixed.cpp
@@ -26,8 +26,7 @@
#include "retx-suppression-fixed.hpp"
#include "algorithm.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
RetxSuppressionFixed::RetxSuppressionFixed(const time::milliseconds& minRetxInterval)
: m_minRetxInterval(minRetxInterval)
@@ -50,5 +49,4 @@
return shouldSuppress ? RetxSuppressionResult::SUPPRESS : RetxSuppressionResult::FORWARD;
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/retx-suppression-fixed.hpp b/daemon/fw/retx-suppression-fixed.hpp
index e8af73b..fdd1114 100644
--- a/daemon/fw/retx-suppression-fixed.hpp
+++ b/daemon/fw/retx-suppression-fixed.hpp
@@ -29,8 +29,7 @@
#include "retx-suppression.hpp"
#include "table/pit-entry.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief a retransmission suppression decision algorithm that
* suppresses retransmissions within a fixed duration
@@ -54,7 +53,6 @@
const time::milliseconds m_minRetxInterval;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_RETX_SUPPRESSION_FIXED_HPP
diff --git a/daemon/fw/retx-suppression.hpp b/daemon/fw/retx-suppression.hpp
index ad983e7..7cf6893 100644
--- a/daemon/fw/retx-suppression.hpp
+++ b/daemon/fw/retx-suppression.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,
@@ -28,8 +28,7 @@
#include "core/common.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
enum class RetxSuppressionResult {
/** \brief Interest is new (not a retransmission)
@@ -45,7 +44,6 @@
SUPPRESS
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_RETX_SUPPRESSION_HPP
diff --git a/daemon/fw/scope-prefix.cpp b/daemon/fw/scope-prefix.cpp
index 984d19c..7f6043b 100644
--- a/daemon/fw/scope-prefix.cpp
+++ b/daemon/fw/scope-prefix.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,
@@ -25,11 +25,9 @@
#include "scope-prefix.hpp"
-namespace nfd {
-namespace scope_prefix {
+namespace nfd::scope_prefix {
const Name LOCALHOST("ndn:/localhost");
const Name LOCALHOP("ndn:/localhop");
-} // namespace scope_prefix
-} // namespace nfd
+} // namespace nfd::scope_prefix
diff --git a/daemon/fw/scope-prefix.hpp b/daemon/fw/scope-prefix.hpp
index 265959d..fd8796c 100644
--- a/daemon/fw/scope-prefix.hpp
+++ b/daemon/fw/scope-prefix.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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,8 +31,7 @@
/** \brief contain name prefixes that affect namespace-based scope control
* \sa https://redmine.named-data.net/projects/nfd/wiki/ScopeControl
*/
-namespace nfd {
-namespace scope_prefix {
+namespace nfd::scope_prefix {
/** \brief ndn:/localhost
*
@@ -58,7 +57,6 @@
*/
extern const Name LOCALHOP;
-} // namespace scope_prefix
-} // namespace nfd
+} // namespace nfd::scope_prefix
#endif // NFD_DAEMON_FW_SCOPE_PREFIX_HPP
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index db58050..399b970 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -36,8 +36,7 @@
#include <boost/range/adaptor/reversed.hpp>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_LOG_INIT(SelfLearningStrategy);
NFD_REGISTER_STRATEGY(SelfLearningStrategy);
@@ -258,5 +257,4 @@
});
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/self-learning-strategy.hpp b/daemon/fw/self-learning-strategy.hpp
index 47e59af..118fe3d 100644
--- a/daemon/fw/self-learning-strategy.hpp
+++ b/daemon/fw/self-learning-strategy.hpp
@@ -30,8 +30,7 @@
#include <ndn-cxx/lp/prefix-announcement-header.hpp>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Self-learning forwarding strategy
*
@@ -138,7 +137,6 @@
renewRoute(const Name& name, FaceId inFaceId, time::milliseconds maxLifetime);
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_SELF_LEARNING_STRATEGY_HPP
diff --git a/daemon/fw/strategy-info.hpp b/daemon/fw/strategy-info.hpp
index 49b5b95..db6e9e6 100644
--- a/daemon/fw/strategy-info.hpp
+++ b/daemon/fw/strategy-info.hpp
@@ -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,
@@ -28,8 +28,7 @@
#include "core/common.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Contains arbitrary information placed by the forwarding strategy on table entries
*/
@@ -51,7 +50,6 @@
StrategyInfo() = default;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_DAEMON_FW_STRATEGY_INFO_HPP
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 1f7babc..d47df3a 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -33,8 +33,7 @@
#include <boost/range/algorithm/copy.hpp>
#include <unordered_set>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_LOG_INIT(Strategy);
@@ -339,5 +338,4 @@
return *fibEntry; // only occurs if no delegation finds a FIB nexthop
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 570f219..4c9a2e5 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -29,8 +29,7 @@
#include "forwarder.hpp"
#include "table/measurements-accessor.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
class StrategyParameters;
@@ -480,8 +479,7 @@
}
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
/** \brief Registers a strategy
*
diff --git a/daemon/fw/unsolicited-data-policy.cpp b/daemon/fw/unsolicited-data-policy.cpp
index b29b827..8ad0f66 100644
--- a/daemon/fw/unsolicited-data-policy.cpp
+++ b/daemon/fw/unsolicited-data-policy.cpp
@@ -28,8 +28,7 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
std::ostream&
operator<<(std::ostream& os, UnsolicitedDataDecision d)
@@ -109,5 +108,4 @@
return UnsolicitedDataDecision::CACHE;
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
index 486903a..d49d40a 100644
--- a/daemon/fw/unsolicited-data-policy.hpp
+++ b/daemon/fw/unsolicited-data-policy.hpp
@@ -28,8 +28,7 @@
#include "face/face.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/**
* \brief Decision made by UnsolicitedDataPolicy
@@ -144,8 +143,7 @@
*/
using DefaultUnsolicitedDataPolicy = DropAllUnsolicitedDataPolicy;
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
/**
* \brief Registers an unsolicited data policy