src: Replace LSA string literals with constants
refs: #2310
Change-Id: I0823c320400fe03b6268982cec05578c04d82ca8
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index d9c63e4..1d8a90c 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -85,12 +85,12 @@
ndn::Name destRouter = rte.getDestination();
(*it).removeRoutingTableEntry(rte);
if (((*it).getRteListSize() == 0) &&
- (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/name"),
- std::string("name"))) &&
- (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/adjacency"),
- std::string("adjacency"))) &&
- (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/coordinate"),
- std::string("coordinate")))) {
+ (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + NameLsa::TYPE_STRING),
+ (NameLsa::TYPE_STRING))) &&
+ (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + AdjLsa::TYPE_STRING),
+ (AdjLsa::TYPE_STRING))) &&
+ (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + CoordinateLsa::TYPE_STRING),
+ (CoordinateLsa::TYPE_STRING)))) {
m_table.erase(it);
m_nlsr.getFib().remove(name);
}