From b4684973f038c596983d974ee34fd4c640a69c05 Mon Sep 17 00:00:00 2001 From: Julien STAUB Date: Tue, 4 Aug 2026 16:53:40 +0200 Subject: [PATCH 1/2] fix some uninitialized fields --- wavefront.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wavefront.cpp b/wavefront.cpp index 1beff681..7b748823 100644 --- a/wavefront.cpp +++ b/wavefront.cpp @@ -46,6 +46,7 @@ wavefront::wavefront( const wavefront &wf): GBSmoothingValue(wf.GBSmoothingValue), m_origin(wf.m_origin), m_manuallyInverted(wf.m_manuallyInverted), + name(wf.name), lambda(wf.lambda), m_outside(wf.m_outside), m_inside(wf.m_inside), @@ -55,6 +56,8 @@ wavefront::wavefront( const wavefront &wf): max(wf.max), std(wf.std), mean(wf.mean), - dirtyZerns(wf.dirtyZerns) + dirtyZerns(wf.dirtyZerns), + regions(wf.regions), + regions_have_been_expanded(wf.regions_have_been_expanded) {} From aafad6896fec4b5687d17bafe1d8feb7fdfcceee Mon Sep 17 00:00:00 2001 From: Julien STAUB Date: Tue, 4 Aug 2026 16:55:03 +0200 Subject: [PATCH 2/2] use default destructor as it works as well --- wavefront.cpp | 11 ----------- wavefront.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/wavefront.cpp b/wavefront.cpp index 7b748823..3a78273e 100644 --- a/wavefront.cpp +++ b/wavefront.cpp @@ -22,17 +22,6 @@ wavefront::wavefront(): { } -wavefront::~wavefront() -{ - - data.release(); - mask.release(); - workData.release(); - workMask.release(); - InputZerns.clear(); - nulledData.release(); - -} wavefront::wavefront( const wavefront &wf): data(wf.data.clone()), nulledData(wf.nulledData.clone()), diff --git a/wavefront.h b/wavefront.h index 1d7d13df..e06cbc60 100644 --- a/wavefront.h +++ b/wavefront.h @@ -36,7 +36,7 @@ class wavefront { public: wavefront(); - ~wavefront(); + ~wavefront() = default; wavefront( const wavefront &wf); // copy constructor doing deep copy of cv::Mat wavefront( wavefront && ) = delete; // move constructor, deleted because unused wavefront& operator=( const wavefront & ) = default; // copy operator not doing deep copy of cv::mat