From: Matthias Maier Date: Mon, 7 Sep 2015 16:02:34 +0000 (-0500) Subject: Bugfix: Remove an unnecessary second pass for value initialization X-Git-Tag: v8.4.0-rc2~466^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fed7bf19a16b010a1567c6c36376861f37978d04;p=dealii.git Bugfix: Remove an unnecessary second pass for value initialization --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 7a52daf46f..41414649bc 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -822,11 +822,13 @@ namespace internal template inline -Tensor::Tensor (const bool initialize) +Tensor::Tensor (const bool /*initialize*/) { - if (initialize) - for (unsigned int i=0; i!=dim; ++i) - values[i] = value_type(); + // All members of the c-style array values are already default initialized + // and thus all values are already set to zero recursively. + + // TODO: Think about using the default heap allocator to restore the old + // behavior. }