fw: move STRATEGY_NAME to getStrategyName static function
This avoids potential problems with static initialization order.
refs #3868
Change-Id: I13f0ff6c51c0a3bd43af7993233ff63a4bca9cf9
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 6bb1d42..9b53b4b 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -31,8 +31,6 @@
namespace fw {
NFD_LOG_INIT("BestRouteStrategy2");
-
-const Name BestRouteStrategy2::STRATEGY_NAME("ndn:/localhost/nfd/strategy/best-route/%FD%04");
NFD_REGISTER_STRATEGY(BestRouteStrategy2);
const time::milliseconds BestRouteStrategy2::RETX_SUPPRESSION_INITIAL(10);
@@ -46,6 +44,13 @@
{
}
+const Name&
+BestRouteStrategy2::getStrategyName()
+{
+ static Name strategyName("/localhost/nfd/strategy/best-route/%FD%04");
+ return strategyName;
+}
+
/** \brief determines whether a NextHop is eligible
* \param inFace incoming face of current Interest
* \param interest incoming Interest