From: bangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Sun, 21 Feb 2010 03:50:10 +0000 (+0000)
Subject: Fix previous checking.
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208ab56bbcf2ab9129cb78edc6a29c182fb6bedd;p=dealii-svn.git

Fix previous checking.


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

diff --git a/deal.II/lac/include/lac/petsc_vector_base.h b/deal.II/lac/include/lac/petsc_vector_base.h
index b7db5d070a..1025b9d7c5 100644
--- a/deal.II/lac/include/lac/petsc_vector_base.h
+++ b/deal.II/lac/include/lac/petsc_vector_base.h
@@ -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