From d19c951572a9d0682a7c415d8ae52a920d71f244 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 28 Mar 2005 22:06:00 +0000 Subject: [PATCH] Get a few issues with constness right. git-svn-id: https://svn.dealii.org/trunk@10260 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/symmetric_tensor.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/deal.II/base/include/base/symmetric_tensor.h b/deal.II/base/include/base/symmetric_tensor.h index a96c8a70a8..32bdce58ed 100644 --- a/deal.II/base/include/base/symmetric_tensor.h +++ b/deal.II/base/include/base/symmetric_tensor.h @@ -110,7 +110,7 @@ namespace internal * access as well as the row we * point to as arguments. */ - RowAccessor (const base_tensor_type &tensor, + RowAccessor (base_tensor_type &tensor, const unsigned int row); /** @@ -120,14 +120,14 @@ namespace internal * of the element (in case this is * a constant tensor). */ - reference operator[] (const unsigned int column) const; + reference operator[] (const unsigned int column); private: /** * Reference to the tensor we * access. */ - const base_tensor_type &base_tensor; + base_tensor_type &base_tensor; /** * Index of the row we access. @@ -374,7 +374,7 @@ namespace internal { template RowAccessor:: - RowAccessor (const base_tensor_type &base_tensor, + RowAccessor (base_tensor_type &base_tensor, const unsigned int row) : base_tensor (base_tensor), @@ -388,7 +388,7 @@ namespace internal template typename RowAccessor::reference RowAccessor:: - operator[] (const unsigned int column) const + operator[] (const unsigned int column) { Assert (column < dim, ExcIndexRange (column, 0, dim)); @@ -426,7 +426,8 @@ namespace internal } Assert (false, ExcInternalError()); - return 0; + static double dummy_but_referenceable = 0; + return dummy_but_referenceable; } } } -- 2.39.5