From e8f2cacb55b2d10d55c883ca5774bb045697e05a Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Sat, 1 Apr 2023 01:54:32 +0200 Subject: [PATCH] Initialize _n1 in copy constructor --- headers/BoostArrays.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/BoostArrays.h b/headers/BoostArrays.h index 6575962..9ee6579 100644 --- a/headers/BoostArrays.h +++ b/headers/BoostArrays.h @@ -13,7 +13,7 @@ class multivec1D { public: multivec1D(){ } //copy constructor - multivec1D(const multivec1D& src) {this->data= make_unique(src._n1); for(int i=0; idata[i] = src.data[i];} + multivec1D(const multivec1D& src) : _n1(src._n1) {this->data= make_unique(src._n1); for(int i=0; idata[i] = src.data[i];} multivec1D(int n1): _n1(n1) { data= make_unique(_n1); }