From 3b71411d84da2d46c8295faf14d1e58054c3b9be Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 29 Apr 2018 22:49:20 +0200 Subject: [PATCH] Use initializer list instead of default initializer --- include/deal.II/lac/read_write_vector.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 -- 2.39.5