build: migrate to C++17
Change-Id: Ic9f09efd20b608bfcb713fd319834b2666cf6242
diff --git a/src/lsa/coordinate-lsa.cpp b/src/lsa/coordinate-lsa.cpp
index f61fb29..fb268b2 100644
--- a/src/lsa/coordinate-lsa.cpp
+++ b/src/lsa/coordinate-lsa.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, The University of Memphis,
+ * Copyright (c) 2014-2022, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -65,16 +65,15 @@
size_t totalLength = 0;
for (auto it = m_hyperbolicAngles.rbegin(); it != m_hyperbolicAngles.rend(); ++it) {
- totalLength += ndn::encoding::prependDoubleBlock(block, ndn::tlv::nlsr::HyperbolicAngle, *it);
+ totalLength += ndn::encoding::prependDoubleBlock(block, nlsr::tlv::HyperbolicAngle, *it);
}
- totalLength += ndn::encoding::prependDoubleBlock(block, ndn::tlv::nlsr::HyperbolicRadius,
- m_hyperbolicRadius);
+ totalLength += ndn::encoding::prependDoubleBlock(block, nlsr::tlv::HyperbolicRadius, m_hyperbolicRadius);
totalLength += Lsa::wireEncode(block);
totalLength += block.prependVarNumber(totalLength);
- totalLength += block.prependVarNumber(ndn::tlv::nlsr::CoordinateLsa);
+ totalLength += block.prependVarNumber(nlsr::tlv::CoordinateLsa);
return totalLength;
}
@@ -104,7 +103,7 @@
{
m_wire = wire;
- if (m_wire.type() != ndn::tlv::nlsr::CoordinateLsa) {
+ if (m_wire.type() != nlsr::tlv::CoordinateLsa) {
NDN_THROW(Error("CoordinateLsa", m_wire.type()));
}
@@ -112,7 +111,7 @@
auto val = m_wire.elements_begin();
- if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Lsa) {
+ if (val != m_wire.elements_end() && val->type() == nlsr::tlv::Lsa) {
Lsa::wireDecode(*val);
++val;
}
@@ -120,7 +119,7 @@
NDN_THROW(Error("Missing required Lsa field"));
}
- if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::HyperbolicRadius) {
+ if (val != m_wire.elements_end() && val->type() == nlsr::tlv::HyperbolicRadius) {
m_hyperbolicRadius = ndn::encoding::readDouble(*val);
++val;
}
@@ -130,7 +129,7 @@
std::vector<double> angles;
for (; val != m_wire.elements_end(); ++val) {
- if (val->type() == ndn::tlv::nlsr::HyperbolicAngle) {
+ if (val->type() == nlsr::tlv::HyperbolicAngle) {
angles.push_back(ndn::encoding::readDouble(*val));
}
else {
@@ -164,9 +163,9 @@
for (const auto& angle : clsa->getCorTheta()) {
m_hyperbolicAngles.push_back(angle);
}
- return std::make_tuple(true, std::list<ndn::Name>{}, std::list<ndn::Name>{});
+ return {true, std::list<ndn::Name>{}, std::list<ndn::Name>{}};
}
- return std::make_tuple(false, std::list<ndn::Name>{}, std::list<ndn::Name>{});
+ return {false, std::list<ndn::Name>{}, std::list<ndn::Name>{}};
}
std::ostream&