From: Wolfgang Bangerth Date: Mon, 28 Mar 2005 22:06:00 +0000 (+0000) Subject: Get a few issues with constness right. X-Git-Tag: v8.0.0~14287 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d19c951572a9d0682a7c415d8ae52a920d71f244;p=dealii.git Get a few issues with constness right. git-svn-id: https://svn.dealii.org/trunk@10260 0785d39b-7218-0410-832d-ea1e28bc413d --- 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; } } }