[PPL-devel] [GIT] ppl/ppl(master): Destructor of abstract class Write_Function has to be virtual.

Enea Zaffanella zaffanella at cs.unipr.it
Sat Mar 21 21:57:03 CET 2009


Module: ppl/ppl
Branch: master
Commit: 471e611fbf18c702d9a26872bc7310e04a4d0f09
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=471e611fbf18c702d9a26872bc7310e04a4d0f09

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Sat Mar 21 21:55:46 2009 +0100

Destructor of abstract class Write_Function has to be virtual.

---

 src/pretty_print.hh         |    2 ++
 src/pretty_print.inlines.hh |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/pretty_print.hh b/src/pretty_print.hh
index de8aa57..f3ac636 100644
--- a/src/pretty_print.hh
+++ b/src/pretty_print.hh
@@ -48,6 +48,8 @@ public:
     The number of characters to be taken from \p buf.
   */
   virtual size_t write(const char* buf, size_t size) = 0;
+
+  virtual ~Write_Function();
 };
 
 //! Helper function for the wrapping of lines.
diff --git a/src/pretty_print.inlines.hh b/src/pretty_print.inlines.hh
index 2db1c5e..f0713ee 100644
--- a/src/pretty_print.inlines.hh
+++ b/src/pretty_print.inlines.hh
@@ -33,6 +33,10 @@ namespace Parma_Polyhedra_Library {
 namespace IO_Operators {
 
 inline
+Write_Function::~Write_Function() {
+}
+
+inline
 Write_To_Stream::Write_To_Stream(std::ostream& str)
   : os(str) {
 }




More information about the PPL-devel mailing list