]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix swap function
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 17 Mar 2005 00:13:31 +0000 (00:13 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 17 Mar 2005 00:13:31 +0000 (00:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@10176 0785d39b-7218-0410-832d-ea1e28bc413d

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

index d37e2081c85a5e77dc228c0ebedbc9eb1d4f4e02..44e648622681019f775c67fef58c79b1f8ef619e 100644 (file)
@@ -315,7 +315,13 @@ template <typename T>
 inline
 void SmartPointer<T>::swap (SmartPointer<T> &tt)
 {
-  swap (t, tt.t);
+#ifdef DEBUG
+  SmartPointer<T> aux(t,id);
+  *this = tt;
+  tt = aux;
+#else
+  std::swap (t, tt.t);
+#endif
 }
 
 

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.