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/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 973c961..d99e5f9 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, 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,
@@ -158,13 +158,13 @@
/** \brief full enumeration implementation
*/
-class FullEnumerationImpl : public EnumerationImpl
+class FullEnumerationImpl final : public EnumerationImpl
{
public:
FullEnumerationImpl(const NameTree& nt, const EntrySelector& pred);
void
- advance(Iterator& i) override;
+ advance(Iterator& i) final;
private:
EntrySelector m_pred;
@@ -175,13 +175,13 @@
* Iterator::m_ref should be initialized to subtree root.
* Iterator::m_state LSB indicates whether to visit children of m_entry.
*/
-class PartialEnumerationImpl : public EnumerationImpl
+class PartialEnumerationImpl final : public EnumerationImpl
{
public:
PartialEnumerationImpl(const NameTree& nt, const EntrySubTreeSelector& pred);
void
- advance(Iterator& i) override;
+ advance(Iterator& i) final;
private:
EntrySubTreeSelector m_pred;
@@ -191,14 +191,14 @@
*
* Iterator::m_ref should be initialized to longest prefix matched entry.
*/
-class PrefixMatchImpl : public EnumerationImpl
+class PrefixMatchImpl final : public EnumerationImpl
{
public:
PrefixMatchImpl(const NameTree& nt, const EntrySelector& pred);
private:
void
- advance(Iterator& i) override;
+ advance(Iterator& i) final;
private:
EntrySelector m_pred;