From 486538c87fbb2e23916e23e570af83336428a510 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 4 May 2015 12:37:05 +0200 Subject: [PATCH] Bugfix: Implement BlockIndices::swap correctly --- include/deal.II/lac/block_indices.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/deal.II/lac/block_indices.h b/include/deal.II/lac/block_indices.h index 97defa2a1b..6713fb44f7 100644 --- a/include/deal.II/lac/block_indices.h +++ b/include/deal.II/lac/block_indices.h @@ -463,11 +463,8 @@ inline void BlockIndices::swap (BlockIndices &b) { - Assert (n_blocks == b.n_blocks, - ExcDimensionMismatch(n_blocks, b.n_blocks)); - - for (size_type i=0; i<=n_blocks; ++i) - std::swap (start_indices[i], b.start_indices[i]); + std::swap(n_blocks, b.n_blocks); + std::swap(start_indices, b.start_indices); } -- 2.39.5