From 88a0a5ad237fea47769eb56aaf00e13c2dcd0eed Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 4 Nov 2007 00:08:09 +0000 Subject: [PATCH] Use a better way to see whether two vectors are the same. git-svn-id: https://svn.dealii.org/trunk@15435 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/vector.templates.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deal.II/lac/include/lac/vector.templates.h b/deal.II/lac/include/lac/vector.templates.h index 70c396ede1..3cea6f17f2 100644 --- a/deal.II/lac/include/lac/vector.templates.h +++ b/deal.II/lac/include/lac/vector.templates.h @@ -14,6 +14,7 @@ #define __deal2__vector_templates_h +#include #include #include @@ -201,7 +202,7 @@ Number Vector::operator * (const Vector& v) const { Assert (vec_size!=0, ExcEmptyObject()); - if (this == reinterpret_cast*>(&v)) + if (PointerComparison::equal (this, &v)) return norm_sqr(); Assert (vec_size == v.size(), ExcDimensionMismatch(vec_size, v.size())); -- 2.39.5