]> https://gitweb.dealii.org/ - dealii.git/commitdiff
One more class that needs a virtual destructor.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 23 Feb 2005 04:09:08 +0000 (04:09 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 23 Feb 2005 04:09:08 +0000 (04:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@9906 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc
deal.II/doc/news/changes.html

index 06d891c6dd13d36f7c464e561a3cf18d84e3c1be..6d9ac660ee007447af47679d5d908b186b334f8b 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
@@ -1596,11 +1596,37 @@ class Triangulation : public Subscriptor
                                      *  For an example see hpDoFHandler().
                                      */
     class RefinementListener
-       {
-       public:
-           virtual void pre_refinement_notification (const Triangulation<dim> &tria);
-           virtual void post_refinement_notification (const Triangulation<dim> &tria);
-       };
+    {
+      public:
+                                         /**
+                                          * Destructor. Does nothing, but is
+                                          * declared virtual because this
+                                          * class also has virtual functions.
+                                          */
+        virtual ~RefinementListener ();
+        
+                                         /**
+                                          * Before refinement is actually
+                                          * performed, the triangulation class
+                                          * calls this method on all objects
+                                          * derived from this class and
+                                          * registered with the triangulation.
+                                          */
+        virtual
+        void
+        pre_refinement_notification (const Triangulation<dim> &tria);
+        
+                                         /**
+                                          * After refinement is actually
+                                          * performed, the triangulation class
+                                          * calls this method on all objects
+                                          * derived from this class and
+                                          * registered with the triangulation.
+                                          */
+        virtual
+        void
+        post_refinement_notification (const Triangulation<dim> &tria);
+    };
     
                                     /**
                                      *  Create a triangulation and create
index ccb5c51619ff9c1986dbb00108335202c5288371..20539f2bae568dcf7d2415bc7768f0f178a804e5 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
@@ -8982,7 +8982,14 @@ void Triangulation<dim>::update_number_cache ()
 }
 
 
-// Refinement listeners
+
+template<int dim>
+Triangulation<dim>::RefinementListener::~RefinementListener ()
+{}
+
+
+
+
 template<int dim>
 void Triangulation<dim>::
 RefinementListener::pre_refinement_notification (const Triangulation<dim> &)
index 729d2ef8b04cecf2c319636610ba4022727da392..250dca9cc1acdf146bc01eae66ec519ef86f3770 100644 (file)
@@ -72,6 +72,15 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p>
+       Fixed: The class <code>Triangulation::RefinementListener</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/22)
+       </p>
+
   <li> <p>
        New: Function <code class="class">FETools</code>::<code
        class="member">compute_embedding_matrices</code> allows for

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.