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/fw/unsolicited-data-policy.cpp b/daemon/fw/unsolicited-data-policy.cpp
index 8cf59d9..b29b827 100644
--- a/daemon/fw/unsolicited-data-policy.cpp
+++ b/daemon/fw/unsolicited-data-policy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -24,6 +24,7 @@
*/
#include "unsolicited-data-policy.hpp"
+
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
@@ -70,7 +71,7 @@
NFD_REGISTER_UNSOLICITED_DATA_POLICY(DropAllUnsolicitedDataPolicy);
UnsolicitedDataDecision
-DropAllUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+DropAllUnsolicitedDataPolicy::decide(const Face&, const Data&) const
{
return UnsolicitedDataDecision::DROP;
}
@@ -79,7 +80,7 @@
NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitLocalUnsolicitedDataPolicy);
UnsolicitedDataDecision
-AdmitLocalUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitLocalUnsolicitedDataPolicy::decide(const Face& inFace, const Data&) const
{
if (inFace.getScope() == ndn::nfd::FACE_SCOPE_LOCAL) {
return UnsolicitedDataDecision::CACHE;
@@ -91,7 +92,7 @@
NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitNetworkUnsolicitedDataPolicy);
UnsolicitedDataDecision
-AdmitNetworkUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitNetworkUnsolicitedDataPolicy::decide(const Face& inFace, const Data&) const
{
if (inFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL) {
return UnsolicitedDataDecision::CACHE;
@@ -103,7 +104,7 @@
NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitAllUnsolicitedDataPolicy);
UnsolicitedDataDecision
-AdmitAllUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitAllUnsolicitedDataPolicy::decide(const Face&, const Data&) const
{
return UnsolicitedDataDecision::CACHE;
}