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/rib/rib-update-batch.hpp b/daemon/rib/rib-update-batch.hpp
index f72a9e8..f3facb3 100644
--- a/daemon/rib/rib-update-batch.hpp
+++ b/daemon/rib/rib-update-batch.hpp
@@ -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,
@@ -33,20 +33,24 @@
namespace nfd {
namespace rib {
-typedef std::list<RibUpdate> RibUpdateList;
+using RibUpdateList = std::list<RibUpdate>;
-/** \brief Represents a collection of RibUpdates to be applied to a single FaceId.
+/**
+ * \brief Represents a collection of RibUpdates to be applied to a single FaceId.
*/
class RibUpdateBatch
{
public:
- typedef RibUpdateList::const_iterator const_iterator;
+ using const_iterator = RibUpdateList::const_iterator;
explicit
RibUpdateBatch(uint64_t faceId);
uint64_t
- getFaceId() const;
+ getFaceId() const
+ {
+ return m_faceId;
+ }
void
add(const RibUpdate& update);
@@ -65,12 +69,6 @@
RibUpdateList m_updates;
};
-inline uint64_t
-RibUpdateBatch::getFaceId() const
-{
- return m_faceId;
-}
-
} // namespace rib
} // namespace nfd