make some constructors explicit

This commit is contained in:
Arne Morten Kvarving
2018-07-16 13:42:33 +02:00
parent d0043ebf3c
commit ae437552d9
5 changed files with 5 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ template<class T1> class SIMSolver : public SIMSolverStat<T1>
{
public:
//! \brief The constructor initializes the reference to the actual solver.
SIMSolver(T1& s1) : SIMSolverStat<T1>(s1,"Time integration driver")
explicit SIMSolver(T1& s1) : SIMSolverStat<T1>(s1,"Time integration driver")
{
saveDivergedSol = false;
}

View File

@@ -28,7 +28,7 @@ template<class T1> class SIMSolverAdap : public SIMSolverStat<T1>
{
public:
//! \brief The constructor forwards to the parent class constructor.
SIMSolverAdap(T1& s1) : SIMSolverStat<T1>(s1), aSim(s1,false)
explicit SIMSolverAdap(T1& s1) : SIMSolverStat<T1>(s1), aSim(s1,false)
{
this->S1.setSol(&aSim.getSolution());
}

View File

@@ -34,7 +34,7 @@ class ElmMats : public LocalIntegral
{
public:
//! \brief Default constructor.
ElmMats(bool lhs = true) : rhsOnly(false), withLHS(lhs) {}
explicit ElmMats(bool lhs = true) : rhsOnly(false), withLHS(lhs) {}
//! \brief Empty destructor.
virtual ~ElmMats() {}

View File

@@ -195,7 +195,7 @@ class VecFunc : public utl::SpatialFunction<Vec3>, public FunctionBase
{
protected:
//! \brief The constructor is protected to allow sub-class instances only.
VecFunc(size_t n = 3) : utl::SpatialFunction<Vec3>(Vec3()) { ncmp = n; }
explicit VecFunc(size_t n = 3) : utl::SpatialFunction<Vec3>(Vec3()) { ncmp = n; }
public:
//! \brief Empty destructor.

View File

@@ -33,7 +33,7 @@ public:
enum StripDirection { U, V, W, ANY };
//! \brief Default constructor.
ThreadGroups(StripDirection dir = ANY) : stripDir(dir) {}
explicit ThreadGroups(StripDirection dir = ANY) : stripDir(dir) {}
//! \brief Calculates a 2D thread group partitioning based on strips.
//! \param[in] el1 Flags non-zero knot spans in first parameter direction