From fed7bf19a16b010a1567c6c36376861f37978d04 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 7 Sep 2015 11:02:34 -0500 Subject: [PATCH] Bugfix: Remove an unnecessary second pass for value initialization --- include/deal.II/base/tensor.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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. } -- 2.39.5