]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make UserClass destructor virtual.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 21 Feb 2005 06:19:34 +0000 (06:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 21 Feb 2005 06:19:34 +0000 (06:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@9904 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/parameter_handler.h
deal.II/base/source/parameter_handler.cc
deal.II/doc/news/changes.html

index e190bee639fd4efb268b8323c850af42e7d8d8c8..eea2440fb2ce466ff2ad8f038e5ec4a2b9e34910 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1871,6 +1871,14 @@ class MultipleParameterLoop : public ParameterHandler
     class UserClass 
     {
       public:
+                                         /**
+                                          * Destructor. It doesn't actually do
+                                          * anything, but is declared to force
+                                          * derived classes to have a virtual
+                                          * destructor.
+                                          */
+        virtual ~UserClass ();
+        
                                         /**
                                          * <tt>create_new</tt> must provide a clean
                                          * object, either by creating a new one
index 54a59183965100a72d9f19235b15f58eb42dfe2e..4709fc7b30f5b12bb8c7edf1d54b44a4692e6955 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1340,6 +1340,10 @@ ParameterHandler::Section::memory_consumption () const
 
 
 
+MultipleParameterLoop::UserClass::~UserClass ()
+{}
+
+
 
 MultipleParameterLoop::MultipleParameterLoop()
                 :
index 7ad07ce7b7fb14a664f4d2a05a8ca42257c1e71f..129ccbdf5683c3e23c35997aa540b41d0348687f 100644 (file)
@@ -47,6 +47,14 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>base</h3>
 
 <ol>
+  <li> <p>
+       Fixed: The class <code>MultipleParameterLoop::UserClass</code> had only
+       virtual abstract functions but no virtual destructor. This caused
+       warnings with some compilers, and is generally bad practice
+       anyway. This is now fixed.
+       <br> 
+       (WB, 2005/02/20)
+       </p>
 </ol>
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.