From eee7a6d211cef5380d4c1f330906269ec770510a Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 8 Jun 2021 11:54:31 +0200 Subject: [PATCH] initialize childs in GradingBox also in default ctor --- libsrc/meshing/localh.cpp | 4 ---- libsrc/meshing/localh.hpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libsrc/meshing/localh.cpp b/libsrc/meshing/localh.cpp index 3afe8e25..27700630 100644 --- a/libsrc/meshing/localh.cpp +++ b/libsrc/meshing/localh.cpp @@ -11,10 +11,6 @@ namespace netgen for (int i = 0; i < 3; i++) xmid[i] = 0.5 * (ax1[i] + ax2[i]); - for (int i = 0; i < 8; i++) - childs[i] = NULL; - father = NULL; - flags.cutboundary = 0; flags.isinner = 0; flags.oldcell = 0; diff --git a/libsrc/meshing/localh.hpp b/libsrc/meshing/localh.hpp index caff6540..7d2ec433 100644 --- a/libsrc/meshing/localh.hpp +++ b/libsrc/meshing/localh.hpp @@ -20,9 +20,9 @@ namespace netgen /// half edgelength float h2; /// - GradingBox * childs[8]; + GradingBox * childs[8] = {nullptr}; /// - GradingBox * father; + GradingBox * father = nullptr; /// double hopt; ///