From 9a2983f97aa5f2961b1b26cb0f11b4553b0d8d3a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 21 Feb 2010 03:50:10 +0000 Subject: [PATCH] Fix previous checking. git-svn-id: https://svn.dealii.org/trunk@20662 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/petsc_vector_base.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 s. @@ -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(*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 (r); + + return *this; } - + inline -- 2.39.5