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/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 3d6e8b2..3248684 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -29,7 +29,6 @@
namespace nfd {
namespace fw {
-const Name MulticastStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/multicast/%FD%01");
NFD_REGISTER_STRATEGY(MulticastStrategy);
MulticastStrategy::MulticastStrategy(Forwarder& forwarder, const Name& name)
@@ -37,6 +36,13 @@
{
}
+const Name&
+MulticastStrategy::getStrategyName()
+{
+ static Name strategyName("/localhost/nfd/strategy/multicast/%FD%01");
+ return strategyName;
+}
+
void
MulticastStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
const shared_ptr<pit::Entry>& pitEntry)