From a51ac9e897b54b13783473cf15e81c25c9dc358f Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 9 Nov 2012 17:10:53 +0000 Subject: [PATCH] Remove an unnecessary micro optimization that triggers -Warray-bounds git-svn-id: https://svn.dealii.org/branches/branch_cmake@27494 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/tensor_base.h | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/deal.II/include/deal.II/base/tensor_base.h b/deal.II/include/deal.II/base/tensor_base.h index 0627a6dfb2..0aae6643f3 100644 --- a/deal.II/include/deal.II/base/tensor_base.h +++ b/deal.II/include/deal.II/base/tensor_base.h @@ -975,30 +975,9 @@ inline Tensor<1,dim,Number> & Tensor<1,dim,Number>::operator = (const Tensor<1,dim,Number> &p) { - // unroll by hand since this is a - // frequently called function and - // some compilers don't want to - // always unroll the loop in the - // general template - switch (dim) - { - case 1: - values[0] = p.values[0]; - break; - case 2: - values[0] = p.values[0]; - values[1] = p.values[1]; - break; - case 3: + for (unsigned int i=0; i