From 193aef217f630d0b9df141d8b9598e13e9c94bf6 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 14 Jan 2014 16:08:14 +0000 Subject: [PATCH] Avoid invalid cast from one to another DoFHandler type. git-svn-id: https://svn.dealii.org/trunk@32204 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/dofs/dof_accessor.templates.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deal.II/include/deal.II/dofs/dof_accessor.templates.h b/deal.II/include/deal.II/dofs/dof_accessor.templates.h index e3dc97f94b..327146e3f5 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -1,7 +1,7 @@ // --------------------------------------------------------------------- // $Id$ // -// Copyright (C) 1999 - 2013 by the deal.II authors +// Copyright (C) 1999 - 2014 by the deal.II authors // // This file is part of the deal.II library. // @@ -77,7 +77,8 @@ template template inline DoFAccessor::DoFAccessor (const DoFAccessor &other) - : BaseClass(other), dof_handler(const_cast(other.dof_handler)) + : BaseClass(other), + dof_handler(0) { Assert (false, ExcInvalidObject()); } @@ -88,7 +89,8 @@ template template inline DoFAccessor::DoFAccessor (const DoFAccessor &other) - : BaseClass(other), dof_handler(const_cast(other.dof_handler)) + : BaseClass(other), + dof_handler(const_cast(other.dof_handler)) { } -- 2.39.5