From 484b34767efdbbd5c3141049b26e01f8a6fff177 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 11 Nov 2012 11:29:59 +0000 Subject: [PATCH] Take over r27494 from branch_cmake: Remove an unnecessary micro optimization that triggers -Warray-bounds git-svn-id: https://svn.dealii.org/trunk@27499 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