fw: use scope_prefix::LOCALHOST in Forwarder

refs #3546

Change-Id: I10a05b642284e7466746cac121d13e7948ca8667
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index b575e3b..612b3e2 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -36,8 +36,6 @@
 
 using fw::Strategy;
 
-const Name Forwarder::LOCALHOST_NAME("ndn:/localhost");
-
 Forwarder::Forwarder()
   : m_faceTable(*this)
   , m_fib(m_nameTree)
@@ -110,7 +108,7 @@
 
   // /localhost scope control
   bool isViolatingLocalhost = inFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL &&
-                              LOCALHOST_NAME.isPrefixOf(interest.getName());
+                              scope_prefix::LOCALHOST.isPrefixOf(interest.getName());
   if (isViolatingLocalhost) {
     NFD_LOG_DEBUG("onIncomingInterest face=" << inFace.getId() <<
                   " interest=" << interest.getName() << " violates /localhost");
@@ -378,7 +376,7 @@
 
   // /localhost scope control
   bool isViolatingLocalhost = inFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL &&
-                              LOCALHOST_NAME.isPrefixOf(data.getName());
+                              scope_prefix::LOCALHOST.isPrefixOf(data.getName());
   if (isViolatingLocalhost) {
     NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() <<
                   " data=" << data.getName() << " violates /localhost");
@@ -464,7 +462,7 @@
 
   // /localhost scope control
   bool isViolatingLocalhost = outFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL &&
-                              LOCALHOST_NAME.isPrefixOf(data.getName());
+                              scope_prefix::LOCALHOST.isPrefixOf(data.getName());
   if (isViolatingLocalhost) {
     NFD_LOG_DEBUG("onOutgoingData face=" << outFace.getId() <<
                   " data=" << data.getName() << " violates /localhost");
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index bb3935c..99838bb 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -239,8 +239,6 @@
   DeadNonceList      m_deadNonceList;
   NetworkRegionTable m_networkRegionTable;
 
-  static const Name LOCALHOST_NAME;
-
   // allow Strategy (base class) to enter pipelines
   friend class fw::Strategy;
 };
diff --git a/daemon/fw/pit-algorithm.cpp b/daemon/fw/pit-algorithm.cpp
index ca54dfe..ecc8acd 100644
--- a/daemon/fw/pit-algorithm.cpp
+++ b/daemon/fw/pit-algorithm.cpp
@@ -26,13 +26,13 @@
 #include "pit-algorithm.hpp"
 
 namespace nfd {
-namespace fw {
-
 namespace scope_prefix {
 const Name LOCALHOST("ndn:/localhost");
 const Name LOCALHOP("ndn:/localhop");
 } // namespace scope_prefix
 
+namespace fw {
+
 bool
 violatesScope(const pit::Entry& pitEntry, const Face& outFace)
 {
diff --git a/daemon/fw/pit-algorithm.hpp b/daemon/fw/pit-algorithm.hpp
index c5732b8..f901316 100644
--- a/daemon/fw/pit-algorithm.hpp
+++ b/daemon/fw/pit-algorithm.hpp
@@ -33,7 +33,6 @@
  */
 
 namespace nfd {
-namespace fw {
 
 /** \brief contain Name prefix that affects namespace-based scope control
  *  \sa http://redmine.named-data.net/projects/nfd/wiki/ScopeControl
@@ -68,6 +67,8 @@
 
 } // namespace scope_prefix
 
+namespace fw {
+
 /** \brief determine whether forwarding the Interest in \p pitEntry to \p outFace would violate scope
  *  \sa http://redmine.named-data.net/projects/nfd/wiki/ScopeControl
  */