daemon: mark some classes and methods 'final'
As suggested by gcc's -Wsuggest-final-types and -Wsuggest-final-methods
Change-Id: I1622857ee53581efd0c6ce3fe93199c72202d817
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index d6688fc..0f83a64 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -68,7 +68,7 @@
/** \brief StrategyInfo on PIT entry
*/
- class PitInfo : public StrategyInfo
+ class PitInfo final : public StrategyInfo
{
public:
static constexpr int
@@ -83,7 +83,7 @@
/** \brief StrategyInfo in measurements table
*/
- class MtInfo : public StrategyInfo
+ class MtInfo final : public StrategyInfo
{
public:
static constexpr int
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index 14039f6..3a315c9 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.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-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -125,7 +125,7 @@
/** \brief Stores strategy information about each face in this namespace
*/
-class NamespaceInfo : public StrategyInfo
+class NamespaceInfo final : public StrategyInfo
{
public:
static constexpr int
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index c634173..7d0749e 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.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-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,7 +32,7 @@
const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_MAX_INTERVAL = 250_ms;
const float RetxSuppressionExponential::DEFAULT_MULTIPLIER = 2.0f;
-class RetxSuppressionExponential::PitInfo : public StrategyInfo
+class RetxSuppressionExponential::PitInfo final : public StrategyInfo
{
public:
static constexpr int
diff --git a/daemon/fw/self-learning-strategy.hpp b/daemon/fw/self-learning-strategy.hpp
index 9b01005..7ffefc2 100644
--- a/daemon/fw/self-learning-strategy.hpp
+++ b/daemon/fw/self-learning-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -50,7 +50,7 @@
getStrategyName();
/// StrategyInfo on pit::InRecord
- class InRecordInfo : public StrategyInfo
+ class InRecordInfo final : public StrategyInfo
{
public:
static constexpr int
@@ -64,7 +64,7 @@
};
/// StrategyInfo on pit::OutRecord
- class OutRecordInfo : public StrategyInfo
+ class OutRecordInfo final : public StrategyInfo
{
public:
static constexpr int
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
index 766db38..5d562a1 100644
--- a/daemon/fw/unsolicited-data-policy.hpp
+++ b/daemon/fw/unsolicited-data-policy.hpp
@@ -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-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -87,7 +87,7 @@
/** \brief drops all unsolicited Data
*/
-class DropAllUnsolicitedDataPolicy : public UnsolicitedDataPolicy
+class DropAllUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
{
public:
UnsolicitedDataDecision
@@ -99,7 +99,7 @@
/** \brief admits unsolicited Data from local faces
*/
-class AdmitLocalUnsolicitedDataPolicy : public UnsolicitedDataPolicy
+class AdmitLocalUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
{
public:
UnsolicitedDataDecision
@@ -111,7 +111,7 @@
/** \brief admits unsolicited Data from non-local faces
*/
-class AdmitNetworkUnsolicitedDataPolicy : public UnsolicitedDataPolicy
+class AdmitNetworkUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
{
public:
UnsolicitedDataDecision
@@ -123,7 +123,7 @@
/** \brief admits all unsolicited Data
*/
-class AdmitAllUnsolicitedDataPolicy : public UnsolicitedDataPolicy
+class AdmitAllUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
{
public:
UnsolicitedDataDecision
@@ -133,9 +133,9 @@
static const std::string POLICY_NAME;
};
-/** \brief the default UnsolicitedDataPolicy
+/** \brief The default UnsolicitedDataPolicy
*/
-typedef DropAllUnsolicitedDataPolicy DefaultUnsolicitedDataPolicy;
+using DefaultUnsolicitedDataPolicy = DropAllUnsolicitedDataPolicy;
} // namespace fw
} // namespace nfd