From 9de081f847b557d7573c2f7ebe97da048f15cad0 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Mon, 19 Aug 2019 13:50:52 +0200
Subject: [PATCH] readability-redundant-member-init

---
 GeoLib/Point.h                            | 26 +++++++++++------------
 MaterialLib/Fluid/ConstantFluidProperty.h |  5 +----
 MaterialLib/Fluid/Density/IdealGasLaw.h   |  5 +----
 MathLib/Point3dWithID.h                   |  4 +---
 4 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/GeoLib/Point.h b/GeoLib/Point.h
index 4e0160ac77f..d51f00c4097 100644
--- a/GeoLib/Point.h
+++ b/GeoLib/Point.h
@@ -32,24 +32,24 @@ class PointVec;
 class Point : public MathLib::Point3dWithID, public GeoLib::GeoObject
 {
 public:
-    Point(double x1, double x2, double x3,
-        std::size_t id = std::numeric_limits<std::size_t>::max()) :
-        MathLib::Point3dWithID(std::array<double,3>({{x1, x2, x3}}), id),
-        GeoLib::GeoObject()
-    {}
+    Point() = default;
 
-    Point() :
-        MathLib::Point3dWithID(), GeoLib::GeoObject()
-    {}
+    Point(double x1, double x2, double x3,
+          std::size_t id = std::numeric_limits<std::size_t>::max())
+        : MathLib::Point3dWithID(std::array<double, 3>({{x1, x2, x3}}), id)
+    {
+    }
 
-    Point(MathLib::Point3d const& x, std::size_t id) :
-        MathLib::Point3dWithID(x, id), GeoLib::GeoObject()
-    {}
+    Point(MathLib::Point3d const& x, std::size_t id)
+        : MathLib::Point3dWithID(x, id)
+    {
+    }
 
     explicit Point(std::array<double, 3> const& x,
                    std::size_t id = std::numeric_limits<std::size_t>::max())
-        : MathLib::Point3dWithID(x, id), GeoLib::GeoObject()
-    {}
+        : MathLib::Point3dWithID(x, id)
+    {
+    }
 
     /// return a geometry type
     GEOTYPE getGeoType() const override { return GEOTYPE::POINT; }
diff --git a/MaterialLib/Fluid/ConstantFluidProperty.h b/MaterialLib/Fluid/ConstantFluidProperty.h
index 87327aa5e5d..5ba7bfe52c2 100644
--- a/MaterialLib/Fluid/ConstantFluidProperty.h
+++ b/MaterialLib/Fluid/ConstantFluidProperty.h
@@ -22,10 +22,7 @@ namespace Fluid
 class ConstantFluidProperty final : public FluidProperty
 {
 public:
-    explicit ConstantFluidProperty(const double value)
-        : FluidProperty(), _value(value)
-    {
-    }
+    explicit ConstantFluidProperty(const double value) : _value(value) {}
 
     /// Get model name.
     std::string getName() const override { return "Constant"; }
diff --git a/MaterialLib/Fluid/Density/IdealGasLaw.h b/MaterialLib/Fluid/Density/IdealGasLaw.h
index 5e6b29e5b06..507aac7e6bd 100644
--- a/MaterialLib/Fluid/Density/IdealGasLaw.h
+++ b/MaterialLib/Fluid/Density/IdealGasLaw.h
@@ -29,10 +29,7 @@ class IdealGasLaw final : public FluidProperty
 {
 public:
     ///   \param molar_mass Molar mass of the gas phase.
-    explicit IdealGasLaw(const double molar_mass)
-        : FluidProperty(), _molar_mass(molar_mass)
-    {
-    }
+    explicit IdealGasLaw(const double molar_mass) : _molar_mass(molar_mass) {}
 
     /// Get density model name.
     std::string getName() const override { return "Ideal gas law"; }
diff --git a/MathLib/Point3dWithID.h b/MathLib/Point3dWithID.h
index cca3e48c0a7..e58803f0d7d 100644
--- a/MathLib/Point3dWithID.h
+++ b/MathLib/Point3dWithID.h
@@ -57,9 +57,7 @@ public:
 
     /// Default constructor that initializes the id with max of std::size_t
     /// the default constructor of class Point3d.
-    Point3dWithID() :
-        Point3d(), _id(std::numeric_limits<std::size_t>::max())
-    {}
+    Point3dWithID() : _id(std::numeric_limits<std::size_t>::max()) {}
 
     std::size_t getID() const { return _id; }
 
-- 
GitLab