From: Matthias Maier Date: Mon, 4 May 2015 10:37:05 +0000 (+0200) Subject: Bugfix: Implement BlockIndices::swap correctly X-Git-Tag: v8.3.0-rc1~202^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=486538c87fbb2e23916e23e570af83336428a510;p=dealii.git Bugfix: Implement BlockIndices::swap correctly --- 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); }