From 58bbff3d0393af8bacd8190427feb2719d05a7b5 Mon Sep 17 00:00:00 2001 From: kanschat Date: Fri, 12 Aug 2011 23:24:31 +0000 Subject: [PATCH] fix bug and reintroduce old constructor with "explicit" git-svn-id: https://svn.dealii.org/trunk@24059 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/block_indices.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deal.II/include/deal.II/lac/block_indices.h b/deal.II/include/deal.II/lac/block_indices.h index 0be0b045e3..ca481c2e9b 100644 --- a/deal.II/include/deal.II/lac/block_indices.h +++ b/deal.II/include/deal.II/lac/block_indices.h @@ -70,7 +70,7 @@ class BlockIndices : public Subscriptor * Specialized constructor for a * structure with blocks of equal size. */ - BlockIndices(const unsigned int n_blocks, const unsigned int block_size); + explicit BlockIndices(const unsigned int n_blocks, const unsigned int block_size = 0); /** * Reinitialize the number of @@ -339,10 +339,10 @@ BlockIndices::reinit (const std::vector &n) inline -BlockIndices::BlockIndices (/*const unsigned int n_blocks*/) +BlockIndices::BlockIndices () : - n_blocks(0/*n_blocks*/)//, -// start_indices(n_blocks+1, 0) + n_blocks(0), + start_indices(1, 0) {} @@ -413,6 +413,7 @@ inline unsigned int BlockIndices::total_size () const { + if (n_blocks == 0) return 0; return start_indices[n_blocks]; } -- 2.39.5