From 00f24773ce9c3a9c09f5a3bdd1adfeda4c5ab2bc Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sat, 2 Mar 2019 13:16:18 +0100
Subject: [PATCH] Use default member initializer.

clang-tidy modernize-use-default-member-init check
---
 .../DataView/DiagramView/DiagramList.cpp      |  4 +--
 .../DataView/DiagramView/DiagramList.h        |  8 +++---
 .../DataView/ElementTreeModel.cpp             |  3 +--
 .../DataExplorer/DataView/ElementTreeModel.h  |  3 +--
 .../DataView/MeshQualitySelectionDialog.cpp   |  2 +-
 .../DataView/MeshQualitySelectionDialog.h     |  4 +--
 .../DataView/StratView/StratView.h            |  4 +--
 .../DataView/SurfaceExtractionDialog.cpp      |  3 +--
 .../DataView/SurfaceExtractionDialog.h        |  4 +--
 .../VtkVis/VisualizationWidget.cpp            |  5 ++--
 .../DataExplorer/VtkVis/VisualizationWidget.h |  8 +++---
 .../DataExplorer/VtkVis/VtkBGImageSource.cpp  |  5 +---
 .../DataExplorer/VtkVis/VtkBGImageSource.h    |  5 ++--
 .../VtkVis/VtkColorByHeightFilter.cpp         |  2 +-
 .../VtkVis/VtkColorByHeightFilter.h           |  2 +-
 .../VtkVis/VtkColorLookupTable.cpp            |  1 -
 .../DataExplorer/VtkVis/VtkColorLookupTable.h |  2 +-
 .../VtkVis/VtkCustomInteractorStyle.cpp       |  1 -
 .../VtkVis/VtkCustomInteractorStyle.h         |  6 ++---
 .../DataExplorer/VtkVis/VtkGeoImageSource.cpp |  1 -
 .../DataExplorer/VtkVis/VtkGeoImageSource.h   |  4 +--
 .../VtkImageDataToLinePolyDataFilter.cpp      |  3 +--
 .../VtkVis/VtkImageDataToLinePolyDataFilter.h |  2 +-
 .../VtkVis/VtkImageDataToPointCloudFilter.cpp |  7 -----
 .../VtkVis/VtkImageDataToPointCloudFilter.h   | 15 +++++------
 .../VtkImageDataToSurfacePointsFilter.cpp     |  1 -
 .../VtkImageDataToSurfacePointsFilter.h       |  2 +-
 .../DataExplorer/VtkVis/VtkPointsSource.cpp   |  2 +-
 .../DataExplorer/VtkVis/VtkPointsSource.h     |  2 +-
 .../VtkVis/VtkPolylinesSource.cpp             |  2 +-
 .../DataExplorer/VtkVis/VtkPolylinesSource.h  |  2 +-
 .../DataExplorer/VtkVis/VtkStationSource.cpp  |  2 +-
 .../DataExplorer/VtkVis/VtkStationSource.h    |  2 +-
 .../DataExplorer/VtkVis/VtkSurfacesSource.cpp |  2 +-
 .../DataExplorer/VtkVis/VtkSurfacesSource.h   |  2 +-
 .../VtkVis/VtkTextureOnSurfaceFilter.cpp      |  5 +---
 .../VtkVis/VtkTextureOnSurfaceFilter.h        |  4 +--
 .../DataExplorer/VtkVis/VtkVisTabWidget.cpp   |  3 +--
 .../DataExplorer/VtkVis/VtkVisTabWidget.h     |  2 +-
 .../DataHolderLib/ColorLookupTable.cpp        |  3 +--
 Applications/DataHolderLib/ColorLookupTable.h |  2 +-
 Applications/FileIO/CsvInterface.cpp          |  1 -
 Applications/FileIO/CsvInterface.h            |  2 +-
 Applications/FileIO/TetGenInterface.cpp       |  5 +---
 Applications/FileIO/TetGenInterface.h         |  4 +--
 BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp        |  4 +--
 BaseLib/IO/XmlIO/Qt/XMLQtInterface.h          |  2 +-
 GeoLib/MinimalBoundingSphere.cpp              |  6 +----
 GeoLib/MinimalBoundingSphere.h                |  6 +++--
 GeoLib/Station.cpp                            | 21 ++++++---------
 GeoLib/Station.h                              |  7 +++--
 GeoLib/StationBorehole.cpp                    |  7 +++--
 GeoLib/StationBorehole.h                      |  4 +--
 MeshLib/IO/Legacy/MeshIO.cpp                  |  1 -
 MeshLib/IO/Legacy/MeshIO.h                    |  2 +-
 .../MeshGenerators/LayeredMeshGenerator.cpp   |  5 ----
 MeshLib/MeshGenerators/LayeredMeshGenerator.h |  6 ++---
 MeshLib/Vtk/VtkMappedMeshSource.cpp           |  2 +-
 MeshLib/Vtk/VtkMappedMeshSource.h             |  4 +--
 .../VtkMeshNodalCoordinatesTemplate-impl.h    |  7 ++---
 MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h |  4 +--
 .../IntegrationGaussLegendrePrism.h           |  5 ++--
 .../IntegrationGaussLegendrePyramid.h         |  5 ++--
 .../IntegrationGaussLegendreRegular.h         |  5 ++--
 .../Integration/IntegrationGaussLegendreTet.h |  5 ++--
 .../Integration/IntegrationGaussLegendreTri.h |  5 ++--
 .../ComponentTransportFEM.h                   |  4 +--
 ProcessLib/HT/HTLocalAssemblerInterface.h     |  4 +--
 Tests/GeoLib/TestPolygon.cpp                  |  5 ++--
 Tests/GeoLib/TestSimplePolygonTree.cpp        | 11 ++++----
 Tests/MeshLib/MeshProperties.cpp              |  3 +--
 Tests/MeshLib/TestBoundaryElementSearch.cpp   | 20 +++++++-------
 Tests/MeshLib/TestLineMesh.cpp                |  3 +--
 Tests/MeshLib/TestMeshNodeSearch.cpp          | 20 +++++++-------
 Tests/MeshLib/TestQuadMesh.cpp                |  5 ++--
 Tests/MeshLib/TestTriLineMesh.cpp             |  3 +--
 Tests/MeshLib/TestVtkMappedMeshSource.cpp     |  3 +--
 Tests/NumLib/TestDistribution.cpp             | 26 +++++++------------
 Tests/NumLib/TestMeshComponentMap.cpp         |  8 +++---
 79 files changed, 160 insertions(+), 222 deletions(-)

diff --git a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp
index ea7d76eb86a..13ae5de6028 100644
--- a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp
+++ b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp
@@ -24,8 +24,8 @@
 #include <QTextStream>
 #include <limits>
 
-DiagramList::DiagramList() : _maxX(0), _maxY(0), _minX(0), _minY(0), _xLabel(""), _yLabel(""),
-                         _xUnit(""), _yUnit(""), _startDate()
+DiagramList::DiagramList()
+    : _xLabel(""), _yLabel(""), _xUnit(""), _yUnit(""), _startDate()
 {
 }
 
diff --git a/Applications/DataExplorer/DataView/DiagramView/DiagramList.h b/Applications/DataExplorer/DataView/DiagramView/DiagramList.h
index 71498b5c75d..0d670025d21 100644
--- a/Applications/DataExplorer/DataView/DiagramView/DiagramList.h
+++ b/Applications/DataExplorer/DataView/DiagramView/DiagramList.h
@@ -171,10 +171,10 @@ private:
     /// Updates the bounds of the data points contained in the list.
     void update();
 
-    float _maxX;
-    float _maxY;
-    float _minX;
-    float _minY;
+    float _maxX{0};
+    float _maxY{0};
+    float _minX{0};
+    float _minY{0};
     std::vector< std::pair<float, float> > _coords;
     QString _name;
     QString _xLabel;
diff --git a/Applications/DataExplorer/DataView/ElementTreeModel.cpp b/Applications/DataExplorer/DataView/ElementTreeModel.cpp
index 310644e40cd..f889f5aef7d 100644
--- a/Applications/DataExplorer/DataView/ElementTreeModel.cpp
+++ b/Applications/DataExplorer/DataView/ElementTreeModel.cpp
@@ -28,8 +28,7 @@
 /**
  * Constructor.
  */
-ElementTreeModel::ElementTreeModel( QObject* parent )
-    : TreeModel(parent), _mesh_source(nullptr)
+ElementTreeModel::ElementTreeModel(QObject* parent) : TreeModel(parent)
 {
     QList<QVariant> rootData;
     delete _rootItem;
diff --git a/Applications/DataExplorer/DataView/ElementTreeModel.h b/Applications/DataExplorer/DataView/ElementTreeModel.h
index 799be62dea1..3acf2ef0029 100644
--- a/Applications/DataExplorer/DataView/ElementTreeModel.h
+++ b/Applications/DataExplorer/DataView/ElementTreeModel.h
@@ -48,6 +48,5 @@ public slots:
     void setMesh(MeshLib::Mesh const& mesh);
 
 private:
-    vtkUnstructuredGridAlgorithm const* _mesh_source;
-
+    vtkUnstructuredGridAlgorithm const* _mesh_source{nullptr};
 };
diff --git a/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.cpp b/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.cpp
index fd26e4c72b1..c565de0b372 100644
--- a/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.cpp
+++ b/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.cpp
@@ -21,7 +21,7 @@
 
 /// Constructor
 MeshQualitySelectionDialog::MeshQualitySelectionDialog(QDialog* parent)
-: QDialog(parent), _metric (MeshLib::MeshQualityType::EDGERATIO), _histogram_path("")
+    : QDialog(parent), _histogram_path("")
 {
     setupUi(this);
     this->choiceEdges->toggle();
diff --git a/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.h b/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.h
index 29569b35db3..76f2c77408d 100644
--- a/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.h
+++ b/Applications/DataExplorer/DataView/MeshQualitySelectionDialog.h
@@ -30,7 +30,7 @@ class MeshQualitySelectionDialog : public QDialog, private Ui_MeshQualitySelecti
 
 public:
     MeshQualitySelectionDialog(QDialog* parent = nullptr);
-    ~MeshQualitySelectionDialog(void) override;
+    ~MeshQualitySelectionDialog() override;
 
     /// Returns selected metric
     MeshLib::MeshQualityType getSelectedMetric() const { return _metric; }
@@ -42,7 +42,7 @@ public:
     std::string getHistogramPath() const { return _histogram_path; }
 
 private:
-    MeshLib::MeshQualityType _metric;
+    MeshLib::MeshQualityType _metric{MeshLib::MeshQualityType::EDGERATIO};
     std::string _histogram_path;
 
 private slots:
diff --git a/Applications/DataExplorer/DataView/StratView/StratView.h b/Applications/DataExplorer/DataView/StratView/StratView.h
index 44990610df3..0fc64a60436 100644
--- a/Applications/DataExplorer/DataView/StratView/StratView.h
+++ b/Applications/DataExplorer/DataView/StratView/StratView.h
@@ -34,7 +34,7 @@ public:
     /**
      * Creates an empty view.
      */
-    StratView(QWidget* parent = nullptr) : _scene(nullptr) { Q_UNUSED(parent); }
+    StratView(QWidget* parent = nullptr) { Q_UNUSED(parent); }
     ~StratView() override;
 
     /// Sets the Borehole whose data should be visualised.
@@ -72,5 +72,5 @@ private:
     /// Updates the view automatically when a Borehole is added or when the window containing the view changes its state.
     void update();
 
-    StratScene* _scene;
+    StratScene* _scene{nullptr};
 };
diff --git a/Applications/DataExplorer/DataView/SurfaceExtractionDialog.cpp b/Applications/DataExplorer/DataView/SurfaceExtractionDialog.cpp
index fdd158681a9..18930bb76c6 100644
--- a/Applications/DataExplorer/DataView/SurfaceExtractionDialog.cpp
+++ b/Applications/DataExplorer/DataView/SurfaceExtractionDialog.cpp
@@ -16,9 +16,8 @@
 
 #include <QDoubleValidator>
 
-
 SurfaceExtractionDialog::SurfaceExtractionDialog(QDialog* parent)
-    : QDialog(parent), _tolerance(90), _dir(0,0,-1)
+    : QDialog(parent)
 {
     setupUi(this);
     this->xNormalEdit->setValidator(new QDoubleValidator(-1, 1, 3, xNormalEdit));
diff --git a/Applications/DataExplorer/DataView/SurfaceExtractionDialog.h b/Applications/DataExplorer/DataView/SurfaceExtractionDialog.h
index 2e4ee01e4f5..936ed97f4e4 100644
--- a/Applications/DataExplorer/DataView/SurfaceExtractionDialog.h
+++ b/Applications/DataExplorer/DataView/SurfaceExtractionDialog.h
@@ -45,6 +45,6 @@ private slots:
     void reject() override { this->done(QDialog::Rejected); };
 
 private:
-    int _tolerance;
-    MathLib::Vector3 _dir;
+    int _tolerance{90};
+    MathLib::Vector3 _dir{0, 0, -1};
 };
diff --git a/Applications/DataExplorer/VtkVis/VisualizationWidget.cpp b/Applications/DataExplorer/VtkVis/VisualizationWidget.cpp
index 6e4bf917c72..229ba544434 100644
--- a/Applications/DataExplorer/VtkVis/VisualizationWidget.cpp
+++ b/Applications/DataExplorer/VtkVis/VisualizationWidget.cpp
@@ -44,9 +44,8 @@
 #include <QSettings>
 #include <QString>
 
-VisualizationWidget::VisualizationWidget( QWidget* parent /*= 0*/ )
-: QWidget(parent), _vtkRender(nullptr), _markerWidget(nullptr),
-  _interactorStyle(nullptr), _vtkPickCallback(nullptr)
+VisualizationWidget::VisualizationWidget(QWidget* parent /*= 0*/)
+    : QWidget(parent)
 {
     this->setupUi(this);
 
diff --git a/Applications/DataExplorer/VtkVis/VisualizationWidget.h b/Applications/DataExplorer/VtkVis/VisualizationWidget.h
index 14fdb520c1a..c0155df2592 100644
--- a/Applications/DataExplorer/VtkVis/VisualizationWidget.h
+++ b/Applications/DataExplorer/VtkVis/VisualizationWidget.h
@@ -103,9 +103,9 @@ protected slots:
     void on_screenshotPushButton_pressed();
 
 private:
-    vtkRenderer* _vtkRender;
-    vtkOrientationMarkerWidget* _markerWidget;
-    VtkCustomInteractorStyle* _interactorStyle;
-    VtkPickCallback* _vtkPickCallback;
+    vtkRenderer* _vtkRender{nullptr};
+    vtkOrientationMarkerWidget* _markerWidget{nullptr};
+    VtkCustomInteractorStyle* _interactorStyle{nullptr};
+    VtkPickCallback* _vtkPickCallback{nullptr};
     bool _isShowAllOnLoad;
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkBGImageSource.cpp b/Applications/DataExplorer/VtkVis/VtkBGImageSource.cpp
index 8de27e3ab02..fecc58058a0 100644
--- a/Applications/DataExplorer/VtkVis/VtkBGImageSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkBGImageSource.cpp
@@ -30,10 +30,7 @@
 
 vtkStandardNewMacro(VtkBGImageSource);
 
-VtkBGImageSource::VtkBGImageSource() : _origin(0,0), _cellsize(1)
-{
-}
-
+VtkBGImageSource::VtkBGImageSource() = default;
 VtkBGImageSource::~VtkBGImageSource() = default;
 
 void VtkBGImageSource::SetRaster(vtkImageAlgorithm *img, double x0, double y0, double scalingFactor)
diff --git a/Applications/DataExplorer/VtkVis/VtkBGImageSource.h b/Applications/DataExplorer/VtkVis/VtkBGImageSource.h
index 59a0d0fc352..e7e1d7bb6ee 100644
--- a/Applications/DataExplorer/VtkVis/VtkBGImageSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkBGImageSource.h
@@ -43,7 +43,6 @@ protected:
     ~VtkBGImageSource() override;
 
 private:
-
-    std::pair<double, double> _origin;
-    double _cellsize;
+    std::pair<double, double> _origin{0, 0};
+    double _cellsize{1};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.cpp b/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.cpp
index dd944aa78b5..0d55a23a3d9 100644
--- a/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.cpp
@@ -33,7 +33,7 @@
 vtkStandardNewMacro(VtkColorByHeightFilter);
 
 VtkColorByHeightFilter::VtkColorByHeightFilter()
-:  ColorLookupTable(VtkColorLookupTable::New()), _tableRangeScaling(1.0)
+    : ColorLookupTable(VtkColorLookupTable::New())
 {
 }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.h b/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.h
index c7e56a84564..d317d00a95f 100644
--- a/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.h
+++ b/Applications/DataExplorer/VtkVis/VtkColorByHeightFilter.h
@@ -80,5 +80,5 @@ protected:
     VtkColorLookupTable* ColorLookupTable;
 
     double _tableRange[2];
-    double _tableRangeScaling;
+    double _tableRangeScaling{1.0};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp
index 2ee0f48f979..815211c7b1f 100644
--- a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp
@@ -26,7 +26,6 @@
 vtkStandardNewMacro(VtkColorLookupTable);
 
 VtkColorLookupTable::VtkColorLookupTable()
-: _type(DataHolderLib::LUTType::LINEAR)
 {
 }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.h b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.h
index e434e98c1d9..c68a3feab9e 100644
--- a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.h
+++ b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.h
@@ -92,5 +92,5 @@ private:
     unsigned char expInterpolation(unsigned char a, unsigned char b, double gamma, double p) const;
 
     std::map<double, unsigned char*> _dict;
-    DataHolderLib::LUTType _type;
+    DataHolderLib::LUTType _type{DataHolderLib::LUTType::LINEAR};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp
index f3cdc31eb8f..395f04cf498 100644
--- a/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.cpp
@@ -44,7 +44,6 @@
 vtkStandardNewMacro(VtkCustomInteractorStyle);
 
 VtkCustomInteractorStyle::VtkCustomInteractorStyle()
-: _data(nullptr), _highlightActor(false), _alternateMouseActions(false)
 {
     _selectedMapper = vtkDataSetMapper::New();
     _selectedActor = vtkActor::New();
diff --git a/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h
index 5eac9e85a7e..3dc24e3776f 100644
--- a/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h
+++ b/Applications/DataExplorer/VtkVis/VtkCustomInteractorStyle.h
@@ -71,7 +71,7 @@ protected:
     ~VtkCustomInteractorStyle() override;
 
     /// @brief The vtk object to pick.
-    vtkDataObject* _data;
+    vtkDataObject* _data{nullptr};
 
     /// @brief The mapper for highlighting the selected cell.
     vtkDataSetMapper* _selectedMapper;
@@ -80,8 +80,8 @@ protected:
     vtkActor* _selectedActor;
 
 private:
-    bool _highlightActor;
-    bool _alternateMouseActions;
+    bool _highlightActor{false};
+    bool _alternateMouseActions{false};
 
 signals:
     /// @brief Emitted when something was picked.
diff --git a/Applications/DataExplorer/VtkVis/VtkGeoImageSource.cpp b/Applications/DataExplorer/VtkVis/VtkGeoImageSource.cpp
index f93917ba754..29624b7139d 100644
--- a/Applications/DataExplorer/VtkVis/VtkGeoImageSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkGeoImageSource.cpp
@@ -56,7 +56,6 @@ void vtkSimpleImageFilterExampleExecute(vtkImageData* input,
 }
 
 VtkGeoImageSource::VtkGeoImageSource()
-    : _imageSource(nullptr), _x0(0), _y0(0), _z0(0), _spacing(1)
 {
 }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkGeoImageSource.h b/Applications/DataExplorer/VtkVis/VtkGeoImageSource.h
index 06ea8d2be7e..1bbfb483616 100644
--- a/Applications/DataExplorer/VtkVis/VtkGeoImageSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkGeoImageSource.h
@@ -72,7 +72,7 @@ private:
     VtkGeoImageSource(const VtkGeoImageSource&) = delete;  // Not implemented.
     void operator=(const VtkGeoImageSource&) = delete;     // Not implemented
 
-    vtkImageAlgorithm* _imageSource;
+    vtkImageAlgorithm* _imageSource{nullptr};
 
-    double _x0, _y0, _z0, _spacing;
+    double _x0{0}, _y0{0}, _z0{0}, _spacing{1};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.cpp b/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.cpp
index aad88a016de..9b505443802 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.cpp
@@ -26,9 +26,8 @@
 #include <vtkSmartPointer.h>
 
 vtkStandardNewMacro(VtkImageDataToLinePolyDataFilter);
+VtkImageDataToLinePolyDataFilter::VtkImageDataToLinePolyDataFilter()
 
-VtkImageDataToLinePolyDataFilter::VtkImageDataToLinePolyDataFilter() :
-        ImageSpacing(0.0)
 {
     this->SetLengthScaleFactor(1.0);
 }
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.h b/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.h
index 0bed16f4016..1e0edc67131 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.h
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToLinePolyDataFilter.h
@@ -63,7 +63,7 @@ protected:
                     vtkInformationVector* outputVector) override;
 
     /// @brief The spacing of the image
-    double ImageSpacing;
+    double ImageSpacing{0.0};
 
 private:
     VtkImageDataToLinePolyDataFilter(const VtkImageDataToLinePolyDataFilter&) =
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.cpp b/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.cpp
index a4c7847e263..107fc1e556f 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.cpp
@@ -27,13 +27,6 @@
 vtkStandardNewMacro(VtkImageDataToPointCloudFilter);
 
 VtkImageDataToPointCloudFilter::VtkImageDataToPointCloudFilter()
-    : Gamma(1.0),
-      PointScaleFactor(1.0),
-      MinHeight(0),
-      MaxHeight(1000),
-      MinNumberOfPointsPerCell(1),
-      MaxNumberOfPointsPerCell(20),
-      IsLinear(true)
 {
 }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.h b/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.h
index 6e397d2cd3e..0ca7c49887d 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.h
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToPointCloudFilter.h
@@ -70,14 +70,13 @@ protected:
     int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
                     vtkInformationVector* outputVector) override;
 
-    double Gamma;
-    double PointScaleFactor;
-    double MinHeight;
-    double MaxHeight;
-    vtkIdType MinNumberOfPointsPerCell;
-    vtkIdType MaxNumberOfPointsPerCell;
-    bool IsLinear;
-
+    double Gamma{1.0};
+    double PointScaleFactor{1.0};
+    double MinHeight{0};
+    double MaxHeight{1000};
+    vtkIdType MinNumberOfPointsPerCell{1};
+    vtkIdType MaxNumberOfPointsPerCell{20};
+    bool IsLinear{true};
 
 private:
     /// Creates the point objects based on the parameters set by the user
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.cpp b/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.cpp
index 727b8f9334f..a908e95c92f 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.cpp
@@ -27,7 +27,6 @@
 vtkStandardNewMacro(VtkImageDataToSurfacePointsFilter);
 
 VtkImageDataToSurfacePointsFilter::VtkImageDataToSurfacePointsFilter()
-    : PointsPerPixel(20)
 {
 }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.h b/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.h
index e0a7220dfa1..d64c4d6d9da 100644
--- a/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.h
+++ b/Applications/DataExplorer/VtkVis/VtkImageDataToSurfacePointsFilter.h
@@ -57,5 +57,5 @@ private:
     /// Returns a random number in [min, max]
     double getRandomNumber(double const& min, double const& max) const;
 
-    vtkIdType PointsPerPixel;
+    vtkIdType PointsPerPixel{20};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp b/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp
index f031865ac45..bdec78b3a62 100644
--- a/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp
@@ -32,7 +32,7 @@
 
 vtkStandardNewMacro(VtkPointsSource);
 
-VtkPointsSource::VtkPointsSource() : _points(nullptr)
+VtkPointsSource::VtkPointsSource()
 {
     _removable = false; // From VtkAlgorithmProperties
     this->SetNumberOfInputPorts(0);
diff --git a/Applications/DataExplorer/VtkVis/VtkPointsSource.h b/Applications/DataExplorer/VtkVis/VtkPointsSource.h
index 1f79546b2ec..967854ea71a 100644
--- a/Applications/DataExplorer/VtkVis/VtkPointsSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkPointsSource.h
@@ -55,7 +55,7 @@ protected:
                            vtkInformationVector* outputVector) override;
 
     /// The points to visualize
-    const std::vector<GeoLib::Point*>* _points;
+    const std::vector<GeoLib::Point*>* _points{nullptr};
 
 private:
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp
index 4406bea61a2..39e31b83a99 100644
--- a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp
@@ -36,7 +36,7 @@
 
 vtkStandardNewMacro(VtkPolylinesSource);
 
-VtkPolylinesSource::VtkPolylinesSource() : _polylines(nullptr)
+VtkPolylinesSource::VtkPolylinesSource()
 {
     _removable = false; // From VtkAlgorithmProperties
     this->SetNumberOfInputPorts(0);
diff --git a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.h b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.h
index 16f09b32ae7..e1ac0d54f90 100644
--- a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.h
@@ -58,7 +58,7 @@ protected:
                            vtkInformationVector* outputVector) override;
 
     /// The polylines to visualize.
-    const std::vector<GeoLib::Polyline*>* _polylines;
+    const std::vector<GeoLib::Polyline*>* _polylines{nullptr};
 
 private:
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp
index 86c55ff4196..d7a22792039 100644
--- a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp
@@ -35,7 +35,7 @@
 
 vtkStandardNewMacro(VtkStationSource);
 
-VtkStationSource::VtkStationSource() : _stations(nullptr)
+VtkStationSource::VtkStationSource()
 {
     _removable = false; // From VtkAlgorithmProperties
     this->SetNumberOfInputPorts(0);
diff --git a/Applications/DataExplorer/VtkVis/VtkStationSource.h b/Applications/DataExplorer/VtkVis/VtkStationSource.h
index 29abfb101af..403a3f24fd8 100644
--- a/Applications/DataExplorer/VtkVis/VtkStationSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkStationSource.h
@@ -65,7 +65,7 @@ protected:
                            vtkInformationVector* outputVector) override;
 
     /// The stations to visualize
-    const std::vector<GeoLib::Point*>* _stations;
+    const std::vector<GeoLib::Point*>* _stations{nullptr};
 
     /// The colour table for stratigraphic data. This table is either set using the setColorLookupTable() method or is generated
     /// automatically with random colours while creating the VtkStationSource-object.
diff --git a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp
index d846835ea82..2d460ad80fc 100644
--- a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp
@@ -32,7 +32,7 @@
 
 vtkStandardNewMacro(VtkSurfacesSource);
 
-VtkSurfacesSource::VtkSurfacesSource() : _surfaces(nullptr)
+VtkSurfacesSource::VtkSurfacesSource()
 {
     _removable = false; // From VtkAlgorithmProperties
     this->SetNumberOfInputPorts(0);
diff --git a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.h b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.h
index 728bf6a01b0..59c27ff2d7b 100644
--- a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.h
+++ b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.h
@@ -59,7 +59,7 @@ protected:
                            vtkInformationVector* outputVector) override;
 
     /// The surfaces to visualize
-    const std::vector<GeoLib::Surface*>* _surfaces;
+    const std::vector<GeoLib::Surface*>* _surfaces{nullptr};
 
 private:
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.cpp b/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.cpp
index c0c21428317..4f7b0f91edd 100644
--- a/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.cpp
@@ -35,10 +35,7 @@
 
 vtkStandardNewMacro(VtkTextureOnSurfaceFilter);
 
-VtkTextureOnSurfaceFilter::VtkTextureOnSurfaceFilter() : _origin(.0f,.0f), _scalingFactor(.0f)
-{
-}
-
+VtkTextureOnSurfaceFilter::VtkTextureOnSurfaceFilter() = default;
 VtkTextureOnSurfaceFilter::~VtkTextureOnSurfaceFilter() = default;
 
 void VtkTextureOnSurfaceFilter::PrintSelf( ostream& os, vtkIndent indent )
diff --git a/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.h b/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.h
index 40cd5d5d6a8..8a80dfd50f2 100644
--- a/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.h
+++ b/Applications/DataExplorer/VtkVis/VtkTextureOnSurfaceFilter.h
@@ -61,6 +61,6 @@ protected:
                     vtkInformationVector* outputVector) override;
 
 private:
-    std::pair<float, float> _origin;
-    double _scalingFactor;
+    std::pair<float, float> _origin{0, 0};
+    double _scalingFactor{0.};
 };
diff --git a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
index 79866e20e74..ea045e85212 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
@@ -30,8 +30,7 @@
 #include <vtkTransform.h>
 #include <vtkTransformFilter.h>
 
-VtkVisTabWidget::VtkVisTabWidget( QWidget* parent /*= 0*/ )
-    : QWidget(parent), _item(nullptr)
+VtkVisTabWidget::VtkVisTabWidget(QWidget* parent /*= 0*/) : QWidget(parent)
 {
     setupUi(this);
 
diff --git a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.h b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.h
index 12c52d118ea..1ccd0ac61b0 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.h
+++ b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.h
@@ -69,7 +69,7 @@ private:
 
     void translateItem();
 
-    VtkVisPipelineItem* _item;
+    VtkVisPipelineItem* _item{nullptr};
 
 signals:
     /// Is emitted when a property was changed.
diff --git a/Applications/DataHolderLib/ColorLookupTable.cpp b/Applications/DataHolderLib/ColorLookupTable.cpp
index 53539425d12..bd1da866bda 100644
--- a/Applications/DataHolderLib/ColorLookupTable.cpp
+++ b/Applications/DataHolderLib/ColorLookupTable.cpp
@@ -14,8 +14,7 @@
 namespace DataHolderLib
 {
 ColorLookupTable::ColorLookupTable()
-    : _type(DataHolderLib::LUTType::LINEAR),
-      _range(
+    : _range(
           std::make_pair<double, double>(std::numeric_limits<double>::lowest(),
                                          std::numeric_limits<double>::max()))
 
diff --git a/Applications/DataHolderLib/ColorLookupTable.h b/Applications/DataHolderLib/ColorLookupTable.h
index 317e54b258b..d9864cca10e 100644
--- a/Applications/DataHolderLib/ColorLookupTable.h
+++ b/Applications/DataHolderLib/ColorLookupTable.h
@@ -61,7 +61,7 @@ public:
 
 private:
     std::vector< std::tuple<double, Color, std::string> > _lut;
-    LUTType _type;
+    LUTType _type{DataHolderLib::LUTType::LINEAR};
     std::pair<double, double> _range;
 };
 
diff --git a/Applications/FileIO/CsvInterface.cpp b/Applications/FileIO/CsvInterface.cpp
index de5f8eaace6..c5b58526c67 100644
--- a/Applications/FileIO/CsvInterface.cpp
+++ b/Applications/FileIO/CsvInterface.cpp
@@ -22,7 +22,6 @@
 namespace FileIO {
 
 CsvInterface::CsvInterface()
-: _writeCsvHeader(true)
 {
 }
 
diff --git a/Applications/FileIO/CsvInterface.h b/Applications/FileIO/CsvInterface.h
index 0206d0c99ab..b2e0bdd6241 100644
--- a/Applications/FileIO/CsvInterface.h
+++ b/Applications/FileIO/CsvInterface.h
@@ -233,7 +233,7 @@ private:
      */
     void writeValue(std::size_t vec_idx, std::size_t in_vec_idx);
 
-    bool _writeCsvHeader;
+    bool _writeCsvHeader{true};
     std::vector<std::string> _vec_names;
     std::vector< boost::any > _data;
 };
diff --git a/Applications/FileIO/TetGenInterface.cpp b/Applications/FileIO/TetGenInterface.cpp
index 49ad3670867..0d4ebd85672 100644
--- a/Applications/FileIO/TetGenInterface.cpp
+++ b/Applications/FileIO/TetGenInterface.cpp
@@ -33,10 +33,7 @@
 
 namespace FileIO
 {
-TetGenInterface::TetGenInterface() :
-    _zero_based_idx (false), _boundary_markers (false)
-{
-}
+TetGenInterface::TetGenInterface() {}
 
 bool TetGenInterface::readTetGenGeometry (std::string const& geo_fname,
                                           GeoLib::GEOObjects &geo_objects)
diff --git a/Applications/FileIO/TetGenInterface.h b/Applications/FileIO/TetGenInterface.h
index c02358ac359..f9e57540f44 100644
--- a/Applications/FileIO/TetGenInterface.h
+++ b/Applications/FileIO/TetGenInterface.h
@@ -209,9 +209,9 @@ private:
                               std::string const& matId) const;
 
     /// the value is true if the indexing is zero based, else false
-    bool _zero_based_idx;
+    bool _zero_based_idx{false};
 
     /// true if boundary markers are set, false otherwise
-    bool _boundary_markers;
+    bool _boundary_markers{false};
 };
 }  // namespace FileIO
diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp
index da6a6d42634..5d0433a787b 100644
--- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp
+++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp
@@ -31,8 +31,8 @@ namespace BaseLib
 {
 namespace IO
 {
-XMLQtInterface::XMLQtInterface(const QString &schemaFile)
-    : _schemaFile(schemaFile)
+XMLQtInterface::XMLQtInterface(QString schemaFile)
+    : _schemaFile(std::move(schemaFile))
 {}
 
 int XMLQtInterface::readFile(const QString &fileName)
diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h
index cd0908bc53d..4426d8cc6c5 100644
--- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h
+++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h
@@ -30,7 +30,7 @@ namespace IO
 class XMLQtInterface
 {
 public:
-    XMLQtInterface(const QString &schemaFile = "");
+    XMLQtInterface(QString schemaFile = "");
     virtual ~XMLQtInterface() = default;
 
     /// As QXMLStreamWriter seems currently unable to include style-file links into xml-files, this method will workaround this issue and include the stylefile link.
diff --git a/GeoLib/MinimalBoundingSphere.cpp b/GeoLib/MinimalBoundingSphere.cpp
index 8f0ebc47611..c0da60b6e16 100644
--- a/GeoLib/MinimalBoundingSphere.cpp
+++ b/GeoLib/MinimalBoundingSphere.cpp
@@ -21,11 +21,7 @@
 #include "MathLib/Vector3.h"
 
 namespace GeoLib {
-
-MinimalBoundingSphere::MinimalBoundingSphere()
-: _radius(-1), _center(std::numeric_limits<double>::max(), std::numeric_limits<double>::max(), std::numeric_limits<double>::max())
-{
-}
+MinimalBoundingSphere::MinimalBoundingSphere() = default;
 
 MinimalBoundingSphere::MinimalBoundingSphere(
     MathLib::Point3d const& p, double radius)
diff --git a/GeoLib/MinimalBoundingSphere.h b/GeoLib/MinimalBoundingSphere.h
index 2973dd5a5fb..b50ab8e0e63 100644
--- a/GeoLib/MinimalBoundingSphere.h
+++ b/GeoLib/MinimalBoundingSphere.h
@@ -83,8 +83,10 @@ private:
         std::size_t length,
         std::size_t n_boundary_points);
 
-    double _radius;
-    MathLib::Vector3 _center;
+    double _radius{-1};
+    MathLib::Vector3 _center{std::numeric_limits<double>::max(),
+                             std::numeric_limits<double>::max(),
+                             std::numeric_limits<double>::max()};
 };
 
 }  // namespace GeoLib
diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp
index ecd98fd41b8..b43f4bf7eea 100644
--- a/GeoLib/Station.cpp
+++ b/GeoLib/Station.cpp
@@ -24,24 +24,19 @@
 namespace GeoLib
 {
 Station::Station(double x, double y, double z, std::string name)
-    : Point(x, y, z),
-      _name(std::move(name)),
-      _type(Station::StationType::STATION),
-      _station_value(0.0),
-      _sensor_data(nullptr)
+    : Point(x, y, z), _name(std::move(name))
+
 {}
 
 Station::Station(Point* coords, std::string name)
-    : Point(*coords),
-      _name(std::move(name)),
-      _type(Station::StationType::STATION),
-      _station_value(0.0),
-      _sensor_data(nullptr)
+    : Point(*coords), _name(std::move(name))
 {}
 
-Station::Station(Station const& src) :
-    Point(src), _name(src._name), _type(src._type),
-    _station_value(src._station_value), _sensor_data(nullptr)
+Station::Station(Station const& src)
+    : Point(src),
+      _name(src._name),
+      _type(src._type),
+      _station_value(src._station_value)
 {}
 
 Station::~Station()
diff --git a/GeoLib/Station.h b/GeoLib/Station.h
index 0e0eca668d5..4157d4d4cc3 100644
--- a/GeoLib/Station.h
+++ b/GeoLib/Station.h
@@ -95,12 +95,11 @@ public:
 
 protected:
     std::string _name;
-    StationType _type; // GeoSys Station Type
+    StationType _type{Station::StationType::STATION};  // GeoSys Station Type
 
 private:
-    double _station_value;
-    SensorData* _sensor_data;
-
+    double _station_value{0.0};
+    SensorData* _sensor_data{nullptr};
 };
 
 bool isStation(GeoLib::Point const* pnt);
diff --git a/GeoLib/StationBorehole.cpp b/GeoLib/StationBorehole.cpp
index ceb00bb4d93..0f6f154955e 100644
--- a/GeoLib/StationBorehole.cpp
+++ b/GeoLib/StationBorehole.cpp
@@ -30,8 +30,11 @@ namespace GeoLib
 // The Borehole class //
 ////////////////////////
 
-StationBorehole::StationBorehole(double x, double y, double z, const std::string &name) :
-    Station (x, y, z, name), _depth(0), _date(0)
+StationBorehole::StationBorehole(double x,
+                                 double y,
+                                 double z,
+                                 const std::string& name)
+    : Station(x, y, z, name)
 {
     _type = Station::StationType::BOREHOLE;
 
diff --git a/GeoLib/StationBorehole.h b/GeoLib/StationBorehole.h
index 506acbbe59e..d8345ea8df7 100644
--- a/GeoLib/StationBorehole.h
+++ b/GeoLib/StationBorehole.h
@@ -108,8 +108,8 @@ private:
 
     //long profile_type;
     //std::vector<long> _soilType;
-    double _depth; // depth of the borehole
-    int _date; // date when the borehole has been drilled
+    double _depth{0};  // depth of the borehole
+    int _date{0};      // date when the borehole has been drilled
 
     /// Contains the names for all the soil layers
     std::vector<std::string> _soilName;
diff --git a/MeshLib/IO/Legacy/MeshIO.cpp b/MeshLib/IO/Legacy/MeshIO.cpp
index a238f0a422a..e28cdf92e72 100644
--- a/MeshLib/IO/Legacy/MeshIO.cpp
+++ b/MeshLib/IO/Legacy/MeshIO.cpp
@@ -39,7 +39,6 @@ namespace IO
 namespace Legacy {
 
 MeshIO::MeshIO()
-    : _mesh(nullptr)
 {
 }
 
diff --git a/MeshLib/IO/Legacy/MeshIO.h b/MeshLib/IO/Legacy/MeshIO.h
index f06490b2d48..3c83d858605 100644
--- a/MeshLib/IO/Legacy/MeshIO.h
+++ b/MeshLib/IO/Legacy/MeshIO.h
@@ -59,7 +59,7 @@ private:
     MeshLib::Element* readElement(std::istream& line, const std::vector<MeshLib::Node*> &nodes) const;
     std::string ElemType2StringOutput(const MeshLib::MeshElemType t) const;
 
-    const MeshLib::Mesh* _mesh;
+    const MeshLib::Mesh* _mesh{nullptr};
 
 };  /* class */
 
diff --git a/MeshLib/MeshGenerators/LayeredMeshGenerator.cpp b/MeshLib/MeshGenerators/LayeredMeshGenerator.cpp
index 2e9a038571a..91e3fc302f5 100644
--- a/MeshLib/MeshGenerators/LayeredMeshGenerator.cpp
+++ b/MeshLib/MeshGenerators/LayeredMeshGenerator.cpp
@@ -29,11 +29,6 @@
 #include "MeshLib/MeshSearch/NodeSearch.h"
 #include "MeshLib/MeshEditing/RemoveMeshComponents.h"
 
-LayeredMeshGenerator::LayeredMeshGenerator()
-: _elevation_epsilon(0.0001), _minimum_thickness(std::numeric_limits<float>::epsilon())
-{
-}
-
 bool LayeredMeshGenerator::createLayers(
     MeshLib::Mesh const& mesh,
     std::vector<GeoLib::Raster const*> const& rasters,
diff --git a/MeshLib/MeshGenerators/LayeredMeshGenerator.h b/MeshLib/MeshGenerators/LayeredMeshGenerator.h
index 61d7a5d1cb2..8f6079f4560 100644
--- a/MeshLib/MeshGenerators/LayeredMeshGenerator.h
+++ b/MeshLib/MeshGenerators/LayeredMeshGenerator.h
@@ -65,7 +65,7 @@ public:
     std::unique_ptr<MeshLib::Mesh> getMesh(std::string const& mesh_name) const;
 
 protected:
-    LayeredMeshGenerator();
+    LayeredMeshGenerator() = default;
     virtual ~LayeredMeshGenerator() = default;
 
     /// Adds another layer to the subsurface mesh
@@ -92,8 +92,8 @@ protected:
     /// Cleans up the already created objects in case of an error
     void cleanUpOnError();
 
-    double _elevation_epsilon;
-    double _minimum_thickness;
+    double _elevation_epsilon{0.0001};
+    double _minimum_thickness{std::numeric_limits<float>::epsilon()};
     std::vector<int> _materials;
     std::vector<MeshLib::Node*> _nodes;
     std::vector<MeshLib::Element*> _elements;
diff --git a/MeshLib/Vtk/VtkMappedMeshSource.cpp b/MeshLib/Vtk/VtkMappedMeshSource.cpp
index 01e8f1161a7..253c5f72bc5 100644
--- a/MeshLib/Vtk/VtkMappedMeshSource.cpp
+++ b/MeshLib/Vtk/VtkMappedMeshSource.cpp
@@ -38,7 +38,7 @@ vtkStandardNewMacro(VtkMappedMeshSource)
 }
 
 VtkMappedMeshSource::VtkMappedMeshSource()
-    : NumberOfDimensions(0), NumberOfNodes(0)
+
 {
     this->SetNumberOfInputPorts(0);
 }
diff --git a/MeshLib/Vtk/VtkMappedMeshSource.h b/MeshLib/Vtk/VtkMappedMeshSource.h
index b4c0c864979..7e636e1a22a 100644
--- a/MeshLib/Vtk/VtkMappedMeshSource.h
+++ b/MeshLib/Vtk/VtkMappedMeshSource.h
@@ -83,8 +83,8 @@ private:
 
     const MeshLib::Mesh* _mesh;
 
-    int NumberOfDimensions;
-    int NumberOfNodes;
+    int NumberOfDimensions{0};
+    int NumberOfNodes{0};
 
     vtkNew<vtkPoints> Points;
     vtkNew<vtkPointData> PointData;
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
index d42a5e7235d..39a659db6ed 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
@@ -384,11 +384,8 @@ template <class Scalar> void VtkMeshNodalCoordinatesTemplate<Scalar>
 }
 
 template <class Scalar>
-VtkMeshNodalCoordinatesTemplate<Scalar>::VtkMeshNodalCoordinatesTemplate()
-    : _nodes(nullptr), TempDoubleArray(nullptr)
-{
-
-}
+VtkMeshNodalCoordinatesTemplate<Scalar>::VtkMeshNodalCoordinatesTemplate() =
+    default;
 
 template <class Scalar> VtkMeshNodalCoordinatesTemplate<Scalar>
 ::~VtkMeshNodalCoordinatesTemplate()
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
index feb32368809..883183b55ba 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
@@ -119,7 +119,7 @@ protected:
     VtkMeshNodalCoordinatesTemplate();
     ~VtkMeshNodalCoordinatesTemplate() override;
 
-    const std::vector<MeshLib::Node*>* _nodes;
+    const std::vector<MeshLib::Node*>* _nodes{nullptr};
 
 private:
     // Not implemented
@@ -128,7 +128,7 @@ private:
     void operator=(const VtkMeshNodalCoordinatesTemplate&) = delete;
 
     vtkIdType Lookup(const Scalar &val, vtkIdType startIndex);
-    double *TempDoubleArray;
+    double* TempDoubleArray{nullptr};
 };
 
 }  // namespace MeshLib
diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h b/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h
index 0e0fc979b28..866835bd19f 100644
--- a/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h
+++ b/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h
@@ -31,7 +31,6 @@ public:
      * @param order     integration order (default 2)
      */
     explicit IntegrationGaussLegendrePrism(unsigned order = 2)
-        : _order(2), _n_sampl_pt(0)
     {
         this->setIntegrationOrder(order);
     }
@@ -90,8 +89,8 @@ public:
     }
 
 private:
-    unsigned _order;
-    unsigned _n_sampl_pt;
+    unsigned _order{2};
+    unsigned _n_sampl_pt{0};
 };
 
 }  // namespace NumLib
diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h b/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h
index 82011adb2ee..220a41eb0b2 100644
--- a/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h
+++ b/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h
@@ -29,8 +29,7 @@ public:
      *
      * @param order     integration order (default 2)
      */
-    explicit IntegrationGaussLegendrePyramid(unsigned order = 2)
-        : _order(order), _n_sampl_pt(0)
+    explicit IntegrationGaussLegendrePyramid(unsigned order = 2) : _order(order)
     {
         this->setIntegrationOrder(order);
     }
@@ -108,7 +107,7 @@ public:
 
 private:
     unsigned _order;
-    unsigned _n_sampl_pt;
+    unsigned _n_sampl_pt{0};
 };
 
 }  // namespace NumLib
diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h
index 3ce7c619ed3..ecb2e0f2b02 100644
--- a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h
+++ b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h
@@ -36,8 +36,7 @@ public:
     /// integration order.
     ///
     /// @param order     integration order (default 2)
-    explicit IntegrationGaussLegendreRegular(unsigned order = 2)
-        : _order(order), _n_sampl_pt(0)
+    explicit IntegrationGaussLegendreRegular(unsigned order = 2) : _order(order)
     {
         this->setIntegrationOrder(order);
     }
@@ -90,7 +89,7 @@ private:
 
 private:
     unsigned _order;
-    unsigned _n_sampl_pt;
+    unsigned _n_sampl_pt{0};
 };
 
 }  // namespace NumLib
diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h b/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h
index 20c131e0e02..31e77703092 100644
--- a/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h
+++ b/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h
@@ -29,8 +29,7 @@ public:
      *
      * @param order     integration order (default 2)
      */
-    explicit IntegrationGaussLegendreTet(unsigned order = 2)
-        : _order(order), _n_sampl_pt(0)
+    explicit IntegrationGaussLegendreTet(unsigned order = 2) : _order(order)
     {
         this->setIntegrationOrder(order);
     }
@@ -108,7 +107,7 @@ public:
 
 private:
     unsigned _order;
-    unsigned _n_sampl_pt;
+    unsigned _n_sampl_pt{0};
 };
 
 }  // namespace NumLib
diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h b/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h
index 80b56fa7398..5e97a2d0a25 100644
--- a/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h
+++ b/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h
@@ -43,8 +43,7 @@ public:
      *
      * @param order     integration order (default 2)
      */
-    explicit IntegrationGaussLegendreTri(unsigned order = 2)
-        : _order(order), _n_sampl_pt(0)
+    explicit IntegrationGaussLegendreTri(unsigned order = 2) : _order(order)
     {
         this->setIntegrationOrder(order);
     }
@@ -122,7 +121,7 @@ public:
 
 private:
     unsigned _order;
-    unsigned _n_sampl_pt;
+    unsigned _n_sampl_pt{0};
 };
 
 }  // namespace NumLib
diff --git a/ProcessLib/ComponentTransport/ComponentTransportFEM.h b/ProcessLib/ComponentTransport/ComponentTransportFEM.h
index 6f036701cb8..5a6939ed190 100644
--- a/ProcessLib/ComponentTransport/ComponentTransportFEM.h
+++ b/ProcessLib/ComponentTransport/ComponentTransportFEM.h
@@ -54,7 +54,7 @@ class ComponentTransportLocalAssemblerInterface
       public NumLib::ExtrapolatableElement
 {
 public:
-    ComponentTransportLocalAssemblerInterface() : _coupled_solutions(nullptr) {}
+    ComponentTransportLocalAssemblerInterface() = default;
 
     void setStaggeredCoupledSolutions(
         std::size_t const /*mesh_item_id*/,
@@ -70,7 +70,7 @@ public:
         std::vector<double>& cache) const = 0;
 
 protected:
-    CoupledSolutionsForStaggeredScheme* _coupled_solutions;
+    CoupledSolutionsForStaggeredScheme* _coupled_solutions{nullptr};
 };
 
 template <typename ShapeFunction, typename IntegrationMethod,
diff --git a/ProcessLib/HT/HTLocalAssemblerInterface.h b/ProcessLib/HT/HTLocalAssemblerInterface.h
index 885552d73e1..d0113434f66 100644
--- a/ProcessLib/HT/HTLocalAssemblerInterface.h
+++ b/ProcessLib/HT/HTLocalAssemblerInterface.h
@@ -45,7 +45,7 @@ class HTLocalAssemblerInterface : public ProcessLib::LocalAssemblerInterface,
                                   public NumLib::ExtrapolatableElement
 {
 public:
-    HTLocalAssemblerInterface() : _coupled_solutions(nullptr) {}
+    HTLocalAssemblerInterface() = default;
     void setStaggeredCoupledSolutions(
         std::size_t const /*mesh_item_id*/,
         CoupledSolutionsForStaggeredScheme* const coupling_term)
@@ -74,7 +74,7 @@ protected:
      * calculate the secondary variables like velocity for coupled
      * processes.
      */
-    CoupledSolutionsForStaggeredScheme* _coupled_solutions;
+    CoupledSolutionsForStaggeredScheme* _coupled_solutions{nullptr};
 };
 
 }  // namespace HT
diff --git a/Tests/GeoLib/TestPolygon.cpp b/Tests/GeoLib/TestPolygon.cpp
index 8f14534b5eb..feedfc00096 100644
--- a/Tests/GeoLib/TestPolygon.cpp
+++ b/Tests/GeoLib/TestPolygon.cpp
@@ -35,8 +35,7 @@
 class PolygonTest : public testing::Test
 {
 public:
-    PolygonTest() :
-        _polygon(nullptr)
+    PolygonTest()
     {
         // create points and construct polygon
         _pnts.push_back(new GeoLib::Point( 0.0, 0.0,0.0)); // 0
@@ -75,7 +74,7 @@ public:
 
 protected:
     std::vector<GeoLib::Point*> _pnts;
-    GeoLib::Polygon *_polygon;
+    GeoLib::Polygon* _polygon{nullptr};
 };
 
 TEST_F(PolygonTest, isPntInPolygonCheckCorners)
diff --git a/Tests/GeoLib/TestSimplePolygonTree.cpp b/Tests/GeoLib/TestSimplePolygonTree.cpp
index c631c8a3f3d..1278377dbdb 100644
--- a/Tests/GeoLib/TestSimplePolygonTree.cpp
+++ b/Tests/GeoLib/TestSimplePolygonTree.cpp
@@ -40,8 +40,7 @@
 class CreatePolygonTreesTest : public testing::Test
 {
 public:
-    CreatePolygonTreesTest() :
-        _p0(nullptr), _p1(nullptr), _p2(nullptr), _p3(nullptr)
+    CreatePolygonTreesTest()
     {
         // create points and construct polygon
         _pnts.push_back(new GeoLib::Point(0.0,-1.0,0.0));
@@ -100,10 +99,10 @@ public:
 
 protected:
     std::vector<GeoLib::Point*> _pnts;
-    GeoLib::Polygon *_p0;
-    GeoLib::Polygon *_p1;
-    GeoLib::Polygon *_p2;
-    GeoLib::Polygon *_p3;
+    GeoLib::Polygon* _p0{nullptr};
+    GeoLib::Polygon* _p1{nullptr};
+    GeoLib::Polygon* _p2{nullptr};
+    GeoLib::Polygon* _p3{nullptr};
 };
 
 TEST_F(CreatePolygonTreesTest, P0AndP1)
diff --git a/Tests/MeshLib/MeshProperties.cpp b/Tests/MeshLib/MeshProperties.cpp
index b23c5e27be5..d65a7473def 100644
--- a/Tests/MeshLib/MeshProperties.cpp
+++ b/Tests/MeshLib/MeshProperties.cpp
@@ -21,14 +21,13 @@ class MeshLibProperties : public ::testing::Test
 {
 public:
     MeshLibProperties()
-        : mesh(nullptr)
     {
         mesh = MeshLib::MeshGenerator::generateRegularHexMesh(1.0, mesh_size);
     }
 
     ~MeshLibProperties() override { delete mesh; }
     static std::size_t const mesh_size = 5;
-    MeshLib::Mesh * mesh;
+    MeshLib::Mesh* mesh{nullptr};
 };
 std::size_t const MeshLibProperties::mesh_size;
 
diff --git a/Tests/MeshLib/TestBoundaryElementSearch.cpp b/Tests/MeshLib/TestBoundaryElementSearch.cpp
index 801cbc2905c..308d30587fc 100644
--- a/Tests/MeshLib/TestBoundaryElementSearch.cpp
+++ b/Tests/MeshLib/TestBoundaryElementSearch.cpp
@@ -29,9 +29,9 @@ using namespace MeshLib;
 class MeshLibBoundaryElementSearchInSimpleQuadMesh : public testing::Test
 {
 public:
-    MeshLibBoundaryElementSearchInSimpleQuadMesh() :
-        _geometric_size(10.0), _number_of_subdivisions_per_direction(10),
-        _quad_mesh(MeshGenerator::generateRegularQuadMesh(_geometric_size, _number_of_subdivisions_per_direction))
+    MeshLibBoundaryElementSearchInSimpleQuadMesh()
+        : _quad_mesh(MeshGenerator::generateRegularQuadMesh(
+              _geometric_size, _number_of_subdivisions_per_direction))
     {}
 
     ~MeshLibBoundaryElementSearchInSimpleQuadMesh() override
@@ -43,8 +43,8 @@ public:
     }
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{10};
     std::unique_ptr<Mesh> _quad_mesh;
     std::vector<GeoLib::Point*> _pnts;
 };
@@ -52,9 +52,9 @@ protected:
 class MeshLibBoundaryElementSearchInSimpleHexMesh : public testing::Test
 {
 public:
-    MeshLibBoundaryElementSearchInSimpleHexMesh() :
-        _geometric_size(10.0), _number_of_subdivisions_per_direction(10),
-        _hex_mesh(MeshGenerator::generateRegularHexMesh(_geometric_size, _number_of_subdivisions_per_direction))
+    MeshLibBoundaryElementSearchInSimpleHexMesh()
+        : _hex_mesh(MeshGenerator::generateRegularHexMesh(
+              _geometric_size, _number_of_subdivisions_per_direction))
     {
         // Points for the surfaces. Corners of a cube.
         _pnts.push_back(new GeoLib::Point(0.0, 0.0, 0.0));
@@ -81,8 +81,8 @@ public:
         std::size_t const n_eles_2d) const;
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{10};
     std::unique_ptr<Mesh> _hex_mesh;
     std::vector<GeoLib::Point*> _pnts;
 };
diff --git a/Tests/MeshLib/TestLineMesh.cpp b/Tests/MeshLib/TestLineMesh.cpp
index e9e08e82c31..af961ae81cc 100644
--- a/Tests/MeshLib/TestLineMesh.cpp
+++ b/Tests/MeshLib/TestLineMesh.cpp
@@ -17,7 +17,6 @@ class MeshLibLineMesh : public ::testing::Test
 {
     public:
     MeshLibLineMesh()
-        : mesh(nullptr)
     {
         mesh = MeshLib::MeshGenerator::generateLineMesh(extent, mesh_size);
     }
@@ -25,7 +24,7 @@ class MeshLibLineMesh : public ::testing::Test
     ~MeshLibLineMesh() override { delete mesh; }
     static std::size_t const mesh_size = 9;
     double extent = 1.0;
-    MeshLib::Mesh const* mesh;
+    MeshLib::Mesh const* mesh{nullptr};
 };
 std::size_t const MeshLibLineMesh::mesh_size;
 
diff --git a/Tests/MeshLib/TestMeshNodeSearch.cpp b/Tests/MeshLib/TestMeshNodeSearch.cpp
index 83a116f98c9..d21d6022a4c 100644
--- a/Tests/MeshLib/TestMeshNodeSearch.cpp
+++ b/Tests/MeshLib/TestMeshNodeSearch.cpp
@@ -29,32 +29,32 @@ using namespace MeshLib;
 class MeshLibMeshNodeSearchInSimpleQuadMesh : public testing::Test
 {
 public:
-    MeshLibMeshNodeSearchInSimpleQuadMesh() :
-        _geometric_size(10.0), _number_of_subdivisions_per_direction(99),
-        _quad_mesh(MeshGenerator::generateRegularQuadMesh(_geometric_size, _number_of_subdivisions_per_direction))
+    MeshLibMeshNodeSearchInSimpleQuadMesh()
+        : _quad_mesh(MeshGenerator::generateRegularQuadMesh(
+              _geometric_size, _number_of_subdivisions_per_direction))
     {}
 
     ~MeshLibMeshNodeSearchInSimpleQuadMesh() override { delete _quad_mesh; }
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{99};
     Mesh* _quad_mesh;
 };
 
 class MeshLibMeshNodeSearchInSimpleHexMesh : public testing::Test
 {
 public:
-    MeshLibMeshNodeSearchInSimpleHexMesh() :
-        _geometric_size(10.0), _number_of_subdivisions_per_direction(10),
-        _hex_mesh(MeshGenerator::generateRegularHexMesh(_geometric_size, _number_of_subdivisions_per_direction))
+    MeshLibMeshNodeSearchInSimpleHexMesh()
+        : _hex_mesh(MeshGenerator::generateRegularHexMesh(
+              _geometric_size, _number_of_subdivisions_per_direction))
     {}
 
     ~MeshLibMeshNodeSearchInSimpleHexMesh() override { delete _hex_mesh; }
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{10};
     Mesh* _hex_mesh;
 };
 
diff --git a/Tests/MeshLib/TestQuadMesh.cpp b/Tests/MeshLib/TestQuadMesh.cpp
index 357df5b6c9b..5af61fc3bcb 100644
--- a/Tests/MeshLib/TestQuadMesh.cpp
+++ b/Tests/MeshLib/TestQuadMesh.cpp
@@ -18,7 +18,6 @@ class MeshLibQuadMesh : public ::testing::Test
 {
     public:
     MeshLibQuadMesh()
-        : mesh(nullptr)
     {
         mesh = MeshLib::MeshGenerator::generateRegularQuadMesh(1.0, n_elements);
     }
@@ -29,9 +28,9 @@ class MeshLibQuadMesh : public ::testing::Test
     static std::size_t const elements_stride = n_elements - 1;
     static std::size_t const nodes_stride = n_nodes - 1;
 
-    MeshLib::Mesh const* mesh;
+    MeshLib::Mesh const* mesh{nullptr};
 
-    public:
+public:
     // Helper functions to access elements and nodes.
 
     MeshLib::Element* getElement(std::size_t const i, std::size_t const j)
diff --git a/Tests/MeshLib/TestTriLineMesh.cpp b/Tests/MeshLib/TestTriLineMesh.cpp
index 547835cea34..38e92fbb0c9 100644
--- a/Tests/MeshLib/TestTriLineMesh.cpp
+++ b/Tests/MeshLib/TestTriLineMesh.cpp
@@ -19,7 +19,6 @@ class MeshLibTriLineMesh : public ::testing::Test
 {
     public:
     MeshLibTriLineMesh()
-        : mesh(nullptr)
     {
         nodes.push_back(new MeshLib::Node(0, 0, 0));
         nodes.push_back(new MeshLib::Node(1, 0, 0));
@@ -55,7 +54,7 @@ class MeshLibTriLineMesh : public ::testing::Test
         delete mesh;
     }
 
-    MeshLib::Mesh const* mesh;
+    MeshLib::Mesh const* mesh{nullptr};
     std::vector<MeshLib::Node*> nodes;
     std::vector<MeshLib::Element*> elements;
 
diff --git a/Tests/MeshLib/TestVtkMappedMeshSource.cpp b/Tests/MeshLib/TestVtkMappedMeshSource.cpp
index bde8caac046..8974fb035a9 100644
--- a/Tests/MeshLib/TestVtkMappedMeshSource.cpp
+++ b/Tests/MeshLib/TestVtkMappedMeshSource.cpp
@@ -40,7 +40,6 @@ class InSituMesh : public ::testing::Test
 {
     public:
     InSituMesh()
-     : mesh(nullptr)
     {
         mesh = MeshLib::MeshGenerator::generateRegularHexMesh(
             this->length, this->subdivisions);
@@ -129,7 +128,7 @@ class InSituMesh : public ::testing::Test
     }
 
     ~InSituMesh() override { delete mesh; }
-    MeshLib::Mesh * mesh;
+    MeshLib::Mesh* mesh{nullptr};
     const std::size_t subdivisions = 5;
     const double length = 1.0;
     const double dx = length / subdivisions;
diff --git a/Tests/NumLib/TestDistribution.cpp b/Tests/NumLib/TestDistribution.cpp
index 9a2405fb31f..5afc6b503a3 100644
--- a/Tests/NumLib/TestDistribution.cpp
+++ b/Tests/NumLib/TestDistribution.cpp
@@ -30,15 +30,12 @@ class NumLibDistributionQuad : public testing::Test
 {
 public:
     NumLibDistributionQuad()
-        : _geometric_size(10.0),
-          _number_of_subdivisions_per_direction(10),
-          _msh(MeshLib::MeshGenerator::generateRegularQuadMesh(
+        : _msh(MeshLib::MeshGenerator::generateRegularQuadMesh(
               _geometric_size, _number_of_subdivisions_per_direction)),
           _project_name("test"),
           _mshNodesSearcher(*_msh,
                             std::make_unique<MeshGeoToolsLib::SearchLength>(),
-                            MeshGeoToolsLib::SearchAllNodes::Yes),
-          _ply0(nullptr)
+                            MeshGeoToolsLib::SearchAllNodes::Yes)
     {
         // create geometry
         auto pnts = std::make_unique<std::vector<GeoLib::Point*>>();
@@ -73,13 +70,13 @@ public:
     }
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{10};
     std::unique_ptr<MeshLib::Mesh> _msh;
     GeoLib::GEOObjects _geo_objs;
     std::string _project_name;
     MeshGeoToolsLib::MeshNodeSearcher _mshNodesSearcher;
-    GeoLib::Polyline* _ply0;
+    GeoLib::Polyline* _ply0{nullptr};
     GeoLib::Surface* _sfc1;
 };
 
@@ -87,15 +84,12 @@ class NumLibDistributionHex : public testing::Test
 {
 public:
     NumLibDistributionHex()
-        : _geometric_size(10.0),
-          _number_of_subdivisions_per_direction(10),
-          _msh(MeshLib::MeshGenerator::generateRegularHexMesh(
+        : _msh(MeshLib::MeshGenerator::generateRegularHexMesh(
               _geometric_size, _number_of_subdivisions_per_direction)),
           _project_name("test"),
           _mshNodesSearcher(*_msh,
                             std::make_unique<MeshGeoToolsLib::SearchLength>(),
-                            MeshGeoToolsLib::SearchAllNodes::Yes),
-          _ply0(nullptr)
+                            MeshGeoToolsLib::SearchAllNodes::Yes)
     {
         // create geometry
         auto pnts = std::make_unique<std::vector<GeoLib::Point*>>();
@@ -133,13 +127,13 @@ public:
     }
 
 protected:
-    const double _geometric_size;
-    const std::size_t _number_of_subdivisions_per_direction;
+    const double _geometric_size{10.0};
+    const std::size_t _number_of_subdivisions_per_direction{10};
     std::unique_ptr<MeshLib::Mesh> _msh;
     GeoLib::GEOObjects _geo_objs;
     std::string _project_name;
     MeshGeoToolsLib::MeshNodeSearcher _mshNodesSearcher;
-    GeoLib::Polyline* _ply0;
+    GeoLib::Polyline* _ply0{nullptr};
     GeoLib::Surface* _sfc1;
 };
 
diff --git a/Tests/NumLib/TestMeshComponentMap.cpp b/Tests/NumLib/TestMeshComponentMap.cpp
index 3fdcd6f7a74..8dfc61ea945 100644
--- a/Tests/NumLib/TestMeshComponentMap.cpp
+++ b/Tests/NumLib/TestMeshComponentMap.cpp
@@ -27,9 +27,8 @@ class NumLibMeshComponentMapTest : public ::testing::Test
         using MeshComponentMap = NumLib::MeshComponentMap;
 
     public:
-        NumLibMeshComponentMapTest() : mesh(nullptr), cmap(nullptr)
+        NumLibMeshComponentMapTest()
         {
-            mesh = MeshLib::MeshGenerator::generateLineMesh(1.0, mesh_size);
             MeshLib::MeshSubset nodesSubset{*mesh, mesh->getNodes()};
 
             // Add two components both based on the same nodesSubset.
@@ -44,13 +43,14 @@ class NumLibMeshComponentMapTest : public ::testing::Test
     }
 
     static std::size_t const mesh_size = 9;
-    MeshLib::Mesh const* mesh;
+    MeshLib::Mesh const* mesh =
+        MeshLib::MeshGenerator::generateLineMesh(1.0, mesh_size);
 
     //data component 0 and 1 are assigned to all nodes in the mesh
     static std::size_t const comp0_id = 0;
     static std::size_t const comp1_id = 1;
     std::vector<MeshLib::MeshSubset> components;
-    MeshComponentMap const* cmap;
+    MeshComponentMap const* cmap{nullptr};
 
     //
     // Functions used for checking.
-- 
GitLab