From: Daniel Arndt Date: Sun, 29 Apr 2018 20:49:20 +0000 (+0200) Subject: Use initializer list instead of default initializer X-Git-Tag: v9.0.0-rc1~58^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6387%2Fhead;p=dealii.git Use initializer list instead of default initializer --- diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index e51958adaa..8a9c754881 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -610,7 +610,7 @@ namespace LinearAlgebra /** * Pointer to the array of local elements of this vector. */ - std::unique_ptr values = std::unique_ptr (nullptr, free); + std::unique_ptr values; /** * For parallel loops with TBB, this member variable stores the affinity @@ -668,6 +668,9 @@ namespace LinearAlgebra template inline ReadWriteVector::ReadWriteVector () + : + Subscriptor(), + values(nullptr, free) { // virtual functions called in constructors and destructors never use the // override in a derived class @@ -681,7 +684,8 @@ namespace LinearAlgebra inline ReadWriteVector::ReadWriteVector (const ReadWriteVector &v) : - Subscriptor() + Subscriptor(), + values(nullptr, free) { this->operator=(v); } @@ -691,6 +695,9 @@ namespace LinearAlgebra template inline ReadWriteVector::ReadWriteVector (const size_type size) + : + Subscriptor(), + values(nullptr, free) { // virtual functions called in constructors and destructors never use the // override in a derived class @@ -703,6 +710,9 @@ namespace LinearAlgebra template inline ReadWriteVector::ReadWriteVector (const IndexSet &locally_stored_indices) + : + Subscriptor(), + values(nullptr, free) { // virtual functions called in constructors and destructors never use the // override in a derived class