]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Compare shared_ptr against 0 in a way so that it also works with
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 16 Jul 2010 12:09:14 +0000 (12:09 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 16 Jul 2010 12:09:14 +0000 (12:09 +0000)
current gcc mainline.

git-svn-id: https://svn.dealii.org/trunk@21506 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/iterative_inverse.h

index 0bf78ff0c9e7650d0d1f91d8e6327848be77170b..90e13a3381c55acb7dadc8799dcd4039f72faed7 100644 (file)
@@ -91,7 +91,7 @@ class IterativeInverse : public Subscriptor
                                      * and preconditioner.
                                      */
     void clear();
-    
+
                                     /**
                                      * Solve for right hand side <tt>src</tt>.
                                      */
@@ -111,13 +111,13 @@ class IterativeInverse : public Subscriptor
                                      * parameters.
                                      */
     SolverSelector<VECTOR> solver;
-    
+
   private:
                                     /**
                                      * The matrix in use.
                                      */
     std_cxx1x::shared_ptr<PointerMatrixBase<VECTOR> > matrix;
-    
+
                                     /**
                                      * The preconditioner to use.
                                      */
@@ -126,7 +126,7 @@ class IterativeInverse : public Subscriptor
                                      * The transpose of the matrix in use.
                                      */
     std_cxx1x::shared_ptr<PointerMatrixBase<VECTOR> > transpose_matrix;
-    
+
                                     /**
                                      * The transpose of the preconditioner to use.
                                      */
@@ -161,8 +161,8 @@ template <class VECTOR>
 inline void
 IterativeInverse<VECTOR>::vmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert(matrix != 0, ExcNotInitialized());
-  Assert(preconditioner != 0, ExcNotInitialized());
+  Assert(matrix.get() != 0, ExcNotInitialized());
+  Assert(preconditioner.get() != 0, ExcNotInitialized());
   solver.solve(*matrix, dst, src, *preconditioner);
 }
 

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.