build: migrate to C++17
Change-Id: Ic9f09efd20b608bfcb713fd319834b2666cf6242
diff --git a/tools/nlsrc.cpp b/tools/nlsrc.cpp
index 9eeed3a..982808b 100644
--- a/tools/nlsrc.cpp
+++ b/tools/nlsrc.cpp
@@ -367,15 +367,12 @@
template<class T>
void
-Nlsrc::onFetchSuccess(const ndn::ConstBufferPtr& data,
+Nlsrc::onFetchSuccess(const ndn::ConstBufferPtr& buf,
const std::function<void(const T&)>& recordDataset)
{
- ndn::Block block;
size_t offset = 0;
-
- while (offset < data->size()) {
- bool isOk = false;
- std::tie(isOk, block) = ndn::Block::fromBuffer(data, offset);
+ while (offset < buf->size()) {
+ auto [isOk, block] = ndn::Block::fromBuffer(buf, offset);
if (!isOk) {
std::cerr << "ERROR: cannot decode LSA TLV" << std::endl;
@@ -384,8 +381,8 @@
offset += block.size();
- T data(block);
- recordDataset(data);
+ T dataset(block);
+ recordDataset(dataset);
}
runNextStep();