]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix previous checking.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Feb 2010 03:50:10 +0000 (03:50 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Feb 2010 03:50:10 +0000 (03:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@20662 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/petsc_vector_base.h

index b7db5d070af8c9151da2b845728ae005c510baf1..1025b9d7c5cc746e22fbe26e19ec0e65d05ff5f7 100644 (file)
@@ -118,7 +118,7 @@ namespace PETScWrappers
                                          * operator for non-const objects.
                                          */
         VectorReference & operator = (const VectorReference &r);
-       
+
                                          /**
                                           * Set the referenced element of the
                                           * vector to <tt>s</tt>.
@@ -825,13 +825,17 @@ namespace PETScWrappers
 
     inline
     VectorReference &
-    VectorReference::operator = (const VectorReference &r) 
+    VectorReference::operator = (const VectorReference &r)
     {
-                                      // simply call the other operator
-      static_cast<const VectorReference &>(*this)> = r;
-      return this;
+                                       // as explained in the class
+                                       // documentation, this is not the copy
+                                       // operator. so simply pass on to the
+                                       // "correct" assignment operator
+      *this = static_cast<PetscScalar> (r);
+
+      return *this;
     }
-    
+
 
 
     inline

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.