Use more C++17 features
Mainly structured bindings, inline variables, and class template
argument deduction, plus many more smaller things.
Change-Id: I810d17e0adb470426e4e30c898e03b3140ad052f
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 99892e6..c6c8f2c 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -135,10 +135,7 @@
void
Fib::addOrUpdateNextHop(Entry& entry, Face& face, uint64_t cost)
{
- NextHopList::iterator it;
- bool isNew;
- std::tie(it, isNew) = entry.addOrUpdateNextHop(face, cost);
-
+ auto [it, isNew] = entry.addOrUpdateNextHop(face, cost);
if (isNew)
this->afterNewNextHop(entry.getPrefix(), *it);
}