build: disable `-Wnon-virtual-dtor` compiler warning
It's overkill and suffers from annoying false positives that
prevent us from applying the "protected non-virtual destructor"
idiom in several perfectly valid cases. See for instance the
GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
The -Wdelete-non-virtual-dtor warning (included in -Wall) is
the preferred alternative and is enough to catch the unsafe
cases without false positives.
Partially reverts 847de408cbb2358bbb664d971cc33e73b0b2ef7f
Change-Id: I46ee1f01e7d4e2b125c2c534c6550824ba1de4c0
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 2399826..1b97c92 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -124,7 +124,8 @@
std::ostream&
operator<<(std::ostream& os, const Iterator& i);
-/** \brief Enumeration operation implementation.
+/**
+ * \brief Enumeration operation implementation.
*/
class EnumerationImpl
{
@@ -132,18 +133,19 @@
explicit
EnumerationImpl(const NameTree& nt);
- virtual
- ~EnumerationImpl() = default;
-
virtual void
advance(Iterator& i) = 0;
protected:
+ ~EnumerationImpl() = default;
+
+protected:
const NameTree& nt;
const Hashtable& ht;
};
-/** \brief Full enumeration implementation.
+/**
+ * \brief Full enumeration implementation.
*/
class FullEnumerationImpl final : public EnumerationImpl
{
@@ -157,10 +159,11 @@
EntrySelector m_pred;
};
-/** \brief Partial enumeration implementation.
+/**
+ * \brief Partial enumeration implementation.
*
- * Iterator::m_ref should be initialized to subtree root.
- * Iterator::m_state LSB indicates whether to visit children of m_entry.
+ * Iterator::m_ref should be initialized to subtree root.
+ * Iterator::m_state LSB indicates whether to visit children of m_entry.
*/
class PartialEnumerationImpl final : public EnumerationImpl
{
@@ -174,9 +177,10 @@
EntrySubTreeSelector m_pred;
};
-/** \brief Partial enumeration implementation.
+/**
+ * \brief Partial enumeration implementation.
*
- * Iterator::m_ref should be initialized to longest prefix matched entry.
+ * Iterator::m_ref should be initialized to longest prefix matched entry.
*/
class PrefixMatchImpl final : public EnumerationImpl
{
@@ -191,10 +195,11 @@
EntrySelector m_pred;
};
-/** \brief A Forward Range of name tree entries.
+/**
+ * \brief A forward range of name tree entries.
*
- * This type has .begin() and .end() methods which return Iterator.
- * This type is usable with range-based for.
+ * This type has `.begin()` and `.end()` methods which return Iterator.
+ * This type is usable with range-based for loops.
*/
using Range = boost::iterator_range<Iterator>;