Skip to content
Snippets Groups Projects
Commit 9de081f8 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

readability-redundant-member-init

parent 532e0aa2
No related branches found
No related tags found
No related merge requests found
......@@ -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; }
......
......@@ -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"; }
......
......@@ -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"; }
......
......@@ -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; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment