lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5cb593a 3/7: Enable '-Wnon-virtual-dtor'; fix


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5cb593a 3/7: Enable '-Wnon-virtual-dtor'; fix the issues it flags
Date: Fri, 22 Mar 2019 05:53:36 -0400 (EDT)

branch: master
commit 5cb593aad7787a32a7a3e75e2d47502371bd3500
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Enable '-Wnon-virtual-dtor'; fix the issues it flags
---
 census_view.cpp       | 1 +
 pdf_command_wx.cpp    | 2 ++
 report_table.hpp      | 3 +++
 report_table_test.cpp | 1 +
 workhorse.make        | 2 +-
 5 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/census_view.cpp b/census_view.cpp
index 4a2dbb3..fba4c79 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -527,6 +527,7 @@ bool DatumSequenceRenderer::GetValue(wxVariant& value) const
 class renderer_type_converter
 {
   public:
+    virtual ~renderer_type_converter() = default;
     virtual wxVariant to_variant
         (any_member<Input> const& x
         ,Input             const& row
diff --git a/pdf_command_wx.cpp b/pdf_command_wx.cpp
index 886e80b..c90f493 100644
--- a/pdf_command_wx.cpp
+++ b/pdf_command_wx.cpp
@@ -340,6 +340,8 @@ class table_mixin
     {
     }
 
+    ~table_mixin() = default;
+
     // Description of a single table column.
     struct illustration_table_column
     {
diff --git a/report_table.hpp b/report_table.hpp
index e6c9dc3..60bf256 100644
--- a/report_table.hpp
+++ b/report_table.hpp
@@ -181,6 +181,9 @@ class LMI_SO paginator
     int init(int number_of_rows, int rows_per_group, int max_lines_per_page);
     void print();
 
+  protected:
+    ~paginator() = default;
+
   private:
     virtual void prelude          () = 0;
     virtual void open_page        () = 0;
diff --git a/report_table_test.cpp b/report_table_test.cpp
index 7577399..a33d4c6 100644
--- a/report_table_test.cpp
+++ b/report_table_test.cpp
@@ -405,6 +405,7 @@ class pagination_demo : public paginator
 {
   public:
     pagination_demo() {}
+    virtual ~pagination_demo() = default;
 
     int test(int number_of_rows, int rows_per_group, int max_lines_per_page);
 
diff --git a/workhorse.make b/workhorse.make
index 193c79a..40cd075 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -498,6 +498,7 @@ gcc_cxx_warnings := \
   -Wnoexcept \
   -Wnoexcept-type \
   -Wnon-template-friend \
+  -Wnon-virtual-dtor \
   -Woverloaded-virtual \
   -Wpmf-conversions \
   -Wregister \
@@ -515,7 +516,6 @@ gcc_cxx_warnings := \
 #   members; but expect many false positives.
 
 postponed_gcc_cxx_warnings := \
-  -Wnon-virtual-dtor \
   -Wsign-promo \
 
 # Too many warnings on correct code, e.g. exact comparison to zero:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]