From: Matthias Maier Date: Mon, 4 May 2015 08:15:56 +0000 (+0200) Subject: Bugfix: Correctly set up object in move constructor X-Git-Tag: v8.3.0-rc1~202^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=948d4cbde662256530e4b7e02e9bf148dedbc255;p=dealii.git Bugfix: Correctly set up object in move constructor --- diff --git a/include/deal.II/lac/trilinos_parallel_block_vector.h b/include/deal.II/lac/trilinos_parallel_block_vector.h index 79b5ce176c..9539aef1db 100644 --- a/include/deal.II/lac/trilinos_parallel_block_vector.h +++ b/include/deal.II/lac/trilinos_parallel_block_vector.h @@ -404,6 +404,7 @@ namespace TrilinosWrappers inline BlockVector::BlockVector (BlockVector &&v) { + reinit (0); swap(v); } #endif diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index 26584f5e7e..5c34386a87 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -128,6 +128,9 @@ namespace TrilinosWrappers #ifdef DEAL_II_WITH_CXX11 Vector::Vector (Vector &&v) { + last_action = Zero; + vector.reset(new Epetra_FEVector(Epetra_Map(0,0,0,Utilities::Trilinos::comm_self()))); + swap(v); } #endif