]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add missing ids when copying pointers
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 May 2005 23:17:52 +0000 (23:17 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 May 2005 23:17:52 +0000 (23:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@10654 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/smartpointer.h

index f780daf602bffc1b9bf826b1361b185d328fd644..ee877835d101215d7d47fcfbc823e4d2496751e5 100644 (file)
@@ -73,7 +73,7 @@ class SmartPointer
                                      *
                                      * The <tt>id</tt> is used in the
                                      * call to
-                                     * Subscriptor::subscribe(). The #id of
+                                     * Subscriptor::subscribe(typeid(*this).name()). The #id of
                                      * the object copied is used here.
                                      */
     SmartPointer (const SmartPointer<T> &tt);
@@ -90,7 +90,7 @@ class SmartPointer
                                      *
                                      * The <tt>id</tt> is used in the
                                      * call to
-                                     * Subscriptor::subscribe() and
+                                     * Subscriptor::subscribe(typeid(*this).name()) and
                                      * by ~SmartPointer() in the call
                                      * to Subscriptor::unsubscribe().
                                      */
@@ -331,12 +331,12 @@ inline
 void SmartPointer<T>::swap (T *&tt)
 {
   if (t != 0)
-    t->unsubscribe ();
+    t->unsubscribe (id);
   
   std::swap (t, tt);
 
   if (t != 0)
-    t->subscribe ();
+    t->subscribe (id);
 }
 
 

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.