lsa: change type variable to enum class
Change-Id: I7fba951649771700ce6ccc4be7fb400546607e96
refs: #4340
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index 318ec64..c5f8e09 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -472,12 +472,12 @@
double distance = UNKNOWN_DISTANCE;
ndn::Name srcLsaKey = src;
- srcLsaKey.append("coordinate");
+ srcLsaKey.append(std::to_string(Lsa::Type::COORDINATE));
CoordinateLsa* srcLsa = lsdb.findCoordinateLsa(srcLsaKey);
ndn::Name destLsaKey = dest;
- destLsaKey.append("coordinate");
+ destLsaKey.append(std::to_string(Lsa::Type::COORDINATE));
CoordinateLsa* destLsa = lsdb.findCoordinateLsa(destLsaKey);
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 0f31885..a414e8a 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -58,14 +58,14 @@
if ((!isHrEnabled
&&
pnlsr.getLsdb()
- .doesLsaExist(pnlsr.getConfParameter().getRouterPrefix().toUri()
- + "/" + "adjacency", std::string("adjacency")))
+ .doesLsaExist(ndn::Name{pnlsr.getConfParameter().getRouterPrefix()}
+ .append(std::to_string(Lsa::Type::ADJACENCY)), Lsa::Type::ADJACENCY))
||
(isHrEnabled
&&
pnlsr.getLsdb()
- .doesLsaExist(pnlsr.getConfParameter().getRouterPrefix().toUri()
- + "/" + "coordinate", std::string("coordinate")))) {
+ .doesLsaExist(ndn::Name{pnlsr.getConfParameter().getRouterPrefix()}
+ .append(std::to_string(Lsa::Type::COORDINATE)), Lsa::Type::COORDINATE))) {
if (pnlsr.getIsBuildAdjLsaSheduled() != 1) {
_LOG_TRACE("Clearing old routing table");
clearRoutingTable();