From: Matthias Maier Date: Sun, 11 Nov 2012 11:29:59 +0000 (+0000) Subject: Take over r27494 from branch_cmake: X-Git-Tag: v8.0.0~1840 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=484b34767efdbbd5c3141049b26e01f8a6fff177;p=dealii.git 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 --- 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