]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Mark a couple of variables as const.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Jan 2013 19:26:22 +0000 (19:26 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Jan 2013 19:26:22 +0000 (19:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@27977 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/tensor_product_polynomials_const.cc

index 0f67c765ef32966bd7c0ce36fed5f86bb1a598c5..d85de23467497f8683605c0694f95675bb5363a9 100644 (file)
@@ -87,7 +87,7 @@ double
 TensorProductPolynomialsConst<dim>::compute_value (const unsigned int i,
                                                    const Point<dim> &p) const
 {
-  unsigned int max_indices = Utilities::fixed_power<dim>(polynomials.size());
+  const unsigned int max_indices = Utilities::fixed_power<dim>(polynomials.size());
 
   Assert (i<=max_indices, ExcInternalError());
   if (i<max_indices)
@@ -119,7 +119,7 @@ Tensor<1,dim>
 TensorProductPolynomialsConst<dim>::compute_grad (const unsigned int i,
                                                   const Point<dim> &p) const
 {
-  unsigned int max_indices=pow(polynomials.size(),dim);
+  const unsigned int max_indices=pow(polynomials.size(),dim);
 
   Assert (i<=max_indices, ExcInternalError());
   Tensor<1,dim> grad;
@@ -158,7 +158,7 @@ Tensor<2,dim>
 TensorProductPolynomialsConst<dim>::compute_grad_grad (const unsigned int i,
                                                        const Point<dim> &p) const
 {
-  unsigned int max_indices=pow(polynomials.size(),dim);
+  const unsigned int max_indices=pow(polynomials.size(),dim);
 
   Assert (i<=max_indices, ExcInternalError());
   Tensor<2,dim> grad_grad;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.