]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reorder operations. 2671/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 6 Jun 2016 21:50:59 +0000 (16:50 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 6 Jun 2016 21:50:59 +0000 (16:50 -0500)
First clear all data before triggering the 'clear' signal in the triangulation,
rather than putting the signal code somewhere in the middle.

source/grid/tria.cc

index a8de8204110102dbf332d3a3b23912ae1522fc4e..4b76e7b8d5034881a4dd9eef60d46d6d76d1951e 100644 (file)
@@ -9024,10 +9024,13 @@ Triangulation<dim, spacedim>::~Triangulation ()
 template <int dim, int spacedim>
 void Triangulation<dim, spacedim>::clear ()
 {
+  // clear all content of the triangulation...
   clear_despite_subscriptions();
-  signals.clear();
   periodic_face_pairs_level_0.clear();
   periodic_face_map.clear();
+
+  // ...and then notify listeners to it
+  signals.clear();
 }
 
 

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.