From: Wolfgang Bangerth Date: Mon, 17 Jul 2017 23:11:20 +0000 (-0600) Subject: Use a clearer initialization syntax. X-Git-Tag: v9.0.0-rc1~1410^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4622%2Fhead;p=dealii.git Use a clearer initialization syntax. Specifically, we used the syntax Type object = initializer; in contexts where the initializer is of a different type and the compiler automatically converted this into Type object(initializer); where the constructor called was just a regular constructor that did something with the initializer, but specifically did not copy the object. This is confusing. Use the latter syntax instead. --- diff --git a/include/deal.II/lac/relaxation_block.templates.h b/include/deal.II/lac/relaxation_block.templates.h index c0b7d03ab6..63deb43a73 100644 --- a/include/deal.II/lac/relaxation_block.templates.h +++ b/include/deal.II/lac/relaxation_block.templates.h @@ -279,7 +279,7 @@ void RelaxationBlockJacobi::step const VectorType &src) const { GrowingVectorMemory mem; - typename VectorMemory::Pointer aux = mem; + typename VectorMemory::Pointer aux(mem); aux->reinit(dst, false); *aux = dst; this->do_step(dst, *aux, src, false); @@ -292,7 +292,7 @@ void RelaxationBlockJacobi::Tstep const VectorType &src) const { GrowingVectorMemory mem; - typename VectorMemory::Pointer aux = mem; + typename VectorMemory::Pointer aux(mem); aux->reinit(dst, false); *aux = dst; this->do_step(dst, *aux, src, true); @@ -305,7 +305,7 @@ void RelaxationBlockJacobi::vmult const VectorType &src) const { GrowingVectorMemory mem; - typename VectorMemory::Pointer aux = mem; + typename VectorMemory::Pointer aux(mem); dst = 0; aux->reinit(dst); this->do_step(dst, *aux, src, false); @@ -318,7 +318,7 @@ void RelaxationBlockJacobi::Tvmult const VectorType &src) const { GrowingVectorMemory mem; - typename VectorMemory::Pointer aux = mem; + typename VectorMemory::Pointer aux(mem); dst = 0; aux->reinit(dst); this->do_step(dst, *aux, src, true);