Mod: Single arg ctors must be explicit

This commit is contained in:
berniev
2022-08-15 19:28:04 +10:00
committed by wwmayer
parent 3877fc62c3
commit 180edfa3cc
263 changed files with 473 additions and 473 deletions

View File

@@ -56,7 +56,7 @@ class MeshExport MeshAlgorithm
{
public:
/// Construction
MeshAlgorithm (const MeshKernel &rclM) : _rclMesh(rclM) { }
explicit MeshAlgorithm (const MeshKernel &rclM) : _rclMesh(rclM) { }
/// Destruction
~MeshAlgorithm () { }
@@ -353,7 +353,7 @@ public:
class MeshExport PointCollector : public MeshCollector
{
public:
PointCollector(std::vector<PointIndex>& ind) : indices(ind){}
explicit PointCollector(std::vector<PointIndex>& ind) : indices(ind){}
~PointCollector() override{}
void Append(const MeshCore::MeshKernel& kernel, FacetIndex index) override
{
@@ -371,7 +371,7 @@ private:
class MeshExport FacetCollector : public MeshCollector
{
public:
FacetCollector(std::vector<FacetIndex>& ind) : indices(ind){}
explicit FacetCollector(std::vector<FacetIndex>& ind) : indices(ind){}
~FacetCollector() override{}
void Append(const MeshCore::MeshKernel&, FacetIndex index) override
{
@@ -392,7 +392,7 @@ class MeshExport MeshRefPointToFacets
{
public:
/// Construction
MeshRefPointToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
explicit MeshRefPointToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
{ Rebuild(); }
/// Destruction
~MeshRefPointToFacets ()
@@ -431,7 +431,7 @@ class MeshExport MeshRefFacetToFacets
{
public:
/// Construction
MeshRefFacetToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
explicit MeshRefFacetToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
{ Rebuild(); }
/// Destruction
~MeshRefFacetToFacets ()
@@ -460,7 +460,7 @@ class MeshExport MeshRefPointToPoints
{
public:
/// Construction
MeshRefPointToPoints (const MeshKernel &rclM) : _rclMesh(rclM)
explicit MeshRefPointToPoints (const MeshKernel &rclM) : _rclMesh(rclM)
{ Rebuild(); }
/// Destruction
~MeshRefPointToPoints ()
@@ -489,7 +489,7 @@ class MeshExport MeshRefEdgeToFacets
{
public:
/// Construction
MeshRefEdgeToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
explicit MeshRefEdgeToFacets (const MeshKernel &rclM) : _rclMesh(rclM)
{ Rebuild(); }
/// Destruction
~MeshRefEdgeToFacets ()
@@ -528,7 +528,7 @@ class MeshExport MeshRefNormalToPoints
{
public:
/// Construction
MeshRefNormalToPoints (const MeshKernel &rclM) : _rclMesh(rclM)
explicit MeshRefNormalToPoints (const MeshKernel &rclM) : _rclMesh(rclM)
{ Rebuild(); }
/// Destruction
~MeshRefNormalToPoints ()

View File

@@ -53,7 +53,7 @@ template <class Real>
class PolynomialSurface : public ImplicitSurface<Real>
{
public:
PolynomialSurface (const Real afCoeff[6])
explicit PolynomialSurface (const Real afCoeff[6])
{ for (int i=0; i<6; i++) m_afCoeff[i] = afCoeff[i]; }
virtual ~PolynomialSurface () {}
@@ -498,7 +498,7 @@ public:
* @param pKoef Pointer to the quadric coefficients
* (double [10])
*/
FunctionContainer(const double *pKoef)
explicit FunctionContainer(const double *pKoef)
{
Assign( pKoef );
pImplSurf = new Wm4::QuadricSurface<double>( dKoeff );

View File

@@ -114,7 +114,7 @@ private:
void RemoveUnreferencedPoints();
public:
MeshBuilder(MeshKernel &rclM);
explicit MeshBuilder(MeshKernel &rclM);
~MeshBuilder();
/**
@@ -190,7 +190,7 @@ private:
public:
typedef int size_type;
MeshFastBuilder(MeshKernel &rclM);
explicit MeshFastBuilder(MeshKernel &rclM);
~MeshFastBuilder();
/** Initializes the class. Must be done before adding facets

View File

@@ -343,7 +343,7 @@ namespace MeshCore {
class FitPointCollector : public MeshCollector
{
public:
FitPointCollector(std::set<PointIndex>& ind) : indices(ind){}
explicit FitPointCollector(std::set<PointIndex>& ind) : indices(ind){}
void Append(const MeshCore::MeshKernel& kernel, FacetIndex index) override
{
PointIndex ulP1, ulP2, ulP3;

View File

@@ -55,7 +55,7 @@ private:
class MeshExport MeshCurvature
{
public:
MeshCurvature(const MeshKernel& kernel);
explicit MeshCurvature(const MeshKernel& kernel);
MeshCurvature(const MeshKernel& kernel, const std::vector<FacetIndex>& segm);
float GetRadius() const { return myRadius; }
void SetRadius(float r) { myRadius = r; }

View File

@@ -33,7 +33,7 @@ class MeshKernel;
class MeshExport MeshSimplify
{
public:
MeshSimplify(MeshKernel&);
MeshSimplify(MeshKernel&);//explicit bombs
~MeshSimplify();
void simplify(float tolerance, float reduction);
void simplify(int targetSize);

View File

@@ -50,7 +50,7 @@ public:
/**
* Construction.
*/
MeshEvalInvalids (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalInvalids (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -76,7 +76,7 @@ public:
/**
* Construction.
*/
MeshFixInvalids (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixInvalids (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -101,7 +101,7 @@ public:
/**
* Construction.
*/
MeshEvalDuplicatePoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalDuplicatePoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -127,7 +127,7 @@ public:
/**
* Construction.
*/
MeshFixDuplicatePoints (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixDuplicatePoints (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -149,7 +149,7 @@ public:
/**
* Construction.
*/
MeshEvalNaNPoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalNaNPoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -175,7 +175,7 @@ public:
/**
* Construction.
*/
MeshFixNaNPoints (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixNaNPoints (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -199,7 +199,7 @@ public:
/**
* Construction.
*/
MeshEvalDuplicateFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalDuplicateFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -225,7 +225,7 @@ public:
/**
* Construction.
*/
MeshFixDuplicateFacets (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixDuplicateFacets (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -246,7 +246,7 @@ public:
/**
* Construction.
*/
MeshEvalInternalFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalInternalFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -345,7 +345,7 @@ public:
* It defines the amount of perimeter of a triangle for which the shortest
* edge is considered for removal.
*/
MeshRemoveNeedles (MeshKernel &rclM, float fMinEdgeLen = 0.05f)
explicit MeshRemoveNeedles (MeshKernel &rclM, float fMinEdgeLen = 0.05f)
: MeshValidation(rclM), fMinEdgeLength(std::min(fMinEdgeLen, 0.25f)) {}
/**
* Destruction.
@@ -377,7 +377,7 @@ public:
/**
* Construction. The \arg fFactor must be in the range of 0.0 and 0.5.
*/
MeshFixCaps (MeshKernel &rclM, float fMaxAng = 2.61f, float fFactor = 0.25f) // ~150 degree
explicit MeshFixCaps (MeshKernel &rclM, float fMaxAng = 2.61f, float fFactor = 0.25f) // ~150 degree
: MeshValidation(rclM), fMaxAngle(fMaxAng), fSplitFactor(fFactor) { }
/**
* Destruction.
@@ -470,7 +470,7 @@ public:
/**
* Construction.
*/
MeshFixMergeFacets (MeshKernel &rclM)
explicit MeshFixMergeFacets (MeshKernel &rclM)
: MeshValidation(rclM) { }
/**
* Destruction.
@@ -489,7 +489,7 @@ public:
class MeshExport MeshEvalDentsOnSurface : public MeshEvaluation
{
public:
MeshEvalDentsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalDentsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
~MeshEvalDentsOnSurface() override {}
bool Evaluate() override;
@@ -502,7 +502,7 @@ private:
class MeshExport MeshFixDentsOnSurface : public MeshValidation
{
public:
MeshFixDentsOnSurface (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixDentsOnSurface (MeshKernel &rclM) : MeshValidation( rclM ) { }
~MeshFixDentsOnSurface() override {}
bool Fixup() override;
@@ -516,7 +516,7 @@ public:
class MeshExport MeshEvalFoldsOnSurface : public MeshEvaluation
{
public:
MeshEvalFoldsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalFoldsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
~MeshEvalFoldsOnSurface() override {}
bool Evaluate() override;
@@ -535,7 +535,7 @@ private:
class MeshExport MeshEvalFoldsOnBoundary : public MeshEvaluation
{
public:
MeshEvalFoldsOnBoundary (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalFoldsOnBoundary (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
~MeshEvalFoldsOnBoundary() override {}
bool Evaluate() override;
@@ -548,7 +548,7 @@ private:
class MeshExport MeshFixFoldsOnBoundary : public MeshValidation
{
public:
MeshFixFoldsOnBoundary (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixFoldsOnBoundary (MeshKernel &rclM) : MeshValidation( rclM ) { }
~MeshFixFoldsOnBoundary() override {}
bool Fixup() override;
@@ -561,7 +561,7 @@ public:
class MeshExport MeshEvalFoldOversOnSurface : public MeshEvaluation
{
public:
MeshEvalFoldOversOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalFoldOversOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
~MeshEvalFoldOversOnSurface() override {}
bool Evaluate() override;
@@ -606,7 +606,7 @@ public:
/**
* Construction.
*/
MeshEvalRangeFacet (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalRangeFacet (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -632,7 +632,7 @@ public:
/**
* Construction.
*/
MeshFixRangeFacet (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixRangeFacet (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -654,7 +654,7 @@ public:
/**
* Construction.
*/
MeshEvalRangePoint (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalRangePoint (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -680,7 +680,7 @@ public:
/**
* Construction.
*/
MeshFixRangePoint (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixRangePoint (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -703,7 +703,7 @@ public:
/**
* Construction.
*/
MeshEvalCorruptedFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalCorruptedFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -730,7 +730,7 @@ public:
/**
* Construction.
*/
MeshFixCorruptedFacets (MeshKernel &rclM) : MeshValidation( rclM ) { }
explicit MeshFixCorruptedFacets (MeshKernel &rclM) : MeshValidation( rclM ) { }
/**
* Destruction.
*/
@@ -752,7 +752,7 @@ public:
/**
* Construction.
*/
MeshEvalPointOnEdge (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
explicit MeshEvalPointOnEdge (const MeshKernel &rclM) : MeshEvaluation( rclM ) { }
/**
* Destruction.
*/
@@ -786,7 +786,7 @@ public:
/**
* Construction.
*/
MeshFixPointOnEdge (MeshKernel &rclM, bool fill = false) : MeshValidation( rclM ), fillBoundary(fill) { }
explicit MeshFixPointOnEdge (MeshKernel &rclM, bool fill = false) : MeshValidation( rclM ), fillBoundary(fill) { }
/**
* Destruction.
*/

View File

@@ -110,7 +110,7 @@ public:
//@{
MeshPoint () : _ucFlag(0), _ulProp(0) { }
inline MeshPoint (float x, float y, float z);
inline MeshPoint (const Base::Vector3f &rclPt);
inline MeshPoint (const Base::Vector3f &rclPt);//explicit bombs
inline MeshPoint (const MeshPoint &rclPt);
~MeshPoint () { }
//@}
@@ -583,7 +583,7 @@ public:
// constructor
MeshPointArray () { }
// constructor
MeshPointArray (PointIndex ulSize) : TMeshPointArray(ulSize) { }
explicit MeshPointArray (PointIndex ulSize) : TMeshPointArray(ulSize) { }
/// copy-constructor
MeshPointArray (const MeshPointArray&);
// Destructor
@@ -637,7 +637,7 @@ public:
/// constructor
MeshFacetArray () { }
/// constructor
MeshFacetArray (FacetIndex ulSize) : TMeshFacetArray(ulSize) { }
explicit MeshFacetArray (FacetIndex ulSize) : TMeshFacetArray(ulSize) { }
/// copy-constructor
MeshFacetArray (const MeshFacetArray&);
/// destructor
@@ -684,7 +684,7 @@ public:
class MeshExport MeshPointModifier
{
public:
MeshPointModifier(MeshPointArray& points)
explicit MeshPointModifier(MeshPointArray& points)
: rPoints(points)
{
}
@@ -705,7 +705,7 @@ private:
class MeshExport MeshFacetModifier
{
public:
MeshFacetModifier(MeshFacetArray& facets)
explicit MeshFacetModifier(MeshFacetArray& facets)
: rFacets(facets)
{
}

View File

@@ -44,7 +44,7 @@ namespace MeshCore {
class MeshExport MeshEvaluation
{
public:
MeshEvaluation (const MeshKernel &rclB) : _rclMesh(rclB) {}
explicit MeshEvaluation (const MeshKernel &rclB) : _rclMesh(rclB) {}
virtual ~MeshEvaluation () {}
/**
@@ -70,7 +70,7 @@ protected:
class MeshExport MeshValidation
{
public:
MeshValidation (MeshKernel &rclB) : _rclMesh(rclB) {}
explicit MeshValidation (MeshKernel &rclB) : _rclMesh(rclB) {}
virtual ~MeshValidation () {}
/**
@@ -127,7 +127,7 @@ private:
class MeshExport MeshSameOrientationCollector : public MeshOrientationVisitor
{
public:
MeshSameOrientationCollector(std::vector<FacetIndex>& aulIndices);
explicit MeshSameOrientationCollector(std::vector<FacetIndex>& aulIndices);
/** Returns always true and collects the indices with wrong orientation. */
bool Visit (const MeshFacet &, const MeshFacet &, FacetIndex , unsigned long) override;
@@ -142,7 +142,7 @@ private:
class MeshExport MeshEvalOrientation : public MeshEvaluation
{
public:
MeshEvalOrientation (const MeshKernel& rclM);
explicit MeshEvalOrientation (const MeshKernel& rclM);
~MeshEvalOrientation() override;
bool Evaluate () override;
std::vector<FacetIndex> GetIndices() const;
@@ -158,7 +158,7 @@ private:
class MeshExport MeshFixOrientation : public MeshValidation
{
public:
MeshFixOrientation (MeshKernel& rclM);
explicit MeshFixOrientation (MeshKernel& rclM);
~MeshFixOrientation() override;
bool Fixup() override;
};
@@ -172,7 +172,7 @@ public:
class MeshExport MeshEvalSolid : public MeshEvaluation
{
public:
MeshEvalSolid (const MeshKernel& rclM);
explicit MeshEvalSolid (const MeshKernel& rclM);
~MeshEvalSolid() override;
bool Evaluate () override;
};
@@ -188,7 +188,7 @@ public:
class MeshExport MeshEvalTopology : public MeshEvaluation
{
public:
MeshEvalTopology (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
explicit MeshEvalTopology (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
~MeshEvalTopology () override {}
bool Evaluate () override;
@@ -232,7 +232,7 @@ protected:
class MeshExport MeshEvalPointManifolds : public MeshEvaluation
{
public:
MeshEvalPointManifolds (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
explicit MeshEvalPointManifolds (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
~MeshEvalPointManifolds () override {}
bool Evaluate () override;
@@ -258,7 +258,7 @@ protected:
class MeshExport MeshEvalSingleFacet : public MeshEvalTopology
{
public:
MeshEvalSingleFacet (const MeshKernel &rclB) : MeshEvalTopology(rclB) {}
explicit MeshEvalSingleFacet (const MeshKernel &rclB) : MeshEvalTopology(rclB) {}
~MeshEvalSingleFacet () override {}
bool Evaluate () override;
};
@@ -288,7 +288,7 @@ protected:
class MeshExport MeshEvalSelfIntersection : public MeshEvaluation
{
public:
MeshEvalSelfIntersection (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
explicit MeshEvalSelfIntersection (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
~MeshEvalSelfIntersection () override {}
/// Evaluate the mesh and return if true if there are self intersections
bool Evaluate () override;
@@ -326,7 +326,7 @@ private:
class MeshExport MeshEvalNeighbourhood : public MeshEvaluation
{
public:
MeshEvalNeighbourhood (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
explicit MeshEvalNeighbourhood (const MeshKernel &rclB) : MeshEvaluation(rclB) {}
~MeshEvalNeighbourhood () override {}
bool Evaluate () override;
std::vector<FacetIndex> GetIndices() const;
@@ -339,7 +339,7 @@ public:
class MeshExport MeshFixNeighbourhood : public MeshValidation
{
public:
MeshFixNeighbourhood (MeshKernel &rclB) : MeshValidation(rclB) {}
explicit MeshFixNeighbourhood (MeshKernel &rclB) : MeshValidation(rclB) {}
~MeshFixNeighbourhood () override {}
bool Fixup() override;
};
@@ -357,7 +357,7 @@ public:
class MeshExport MeshEigensystem : public MeshEvaluation
{
public:
MeshEigensystem (const MeshKernel &rclB);
explicit MeshEigensystem (const MeshKernel &rclB);
~MeshEigensystem () override {}
/** Returns the transformation matrix. */

View File

@@ -58,7 +58,7 @@ protected:
/** @name Construction */
//@{
/// Construction
MeshGrid (const MeshKernel &rclM);
explicit MeshGrid (const MeshKernel &rclM);
/// Construction
MeshGrid ();
//@}
@@ -184,7 +184,7 @@ public:
/** @name Construction */
//@{
/// Construction
MeshFacetGrid (const MeshKernel &rclM);
explicit MeshFacetGrid (const MeshKernel &rclM);
/// Construction
MeshFacetGrid () : MeshGrid() { }
/// Construction
@@ -247,7 +247,7 @@ public:
/// Construction
MeshPointGrid ();
/// Construction
MeshPointGrid (const MeshKernel &rclM);
explicit MeshPointGrid (const MeshKernel &rclM);
/// Construction
MeshPointGrid (const MeshKernel &rclM, int iCtGridPerAxis);
/// Construction
@@ -288,7 +288,7 @@ class MeshExport MeshGridIterator
{
public:
/// Construction
MeshGridIterator (const MeshGrid &rclG);
explicit MeshGridIterator (const MeshGrid &rclG);
/** Returns the bounding box of the current grid element. */
Base::BoundBox3f GetBoundBox () const
{ return _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ); }

View File

@@ -36,7 +36,7 @@ class MeshKernel;
class MeshExport MeshInfo
{
public:
MeshInfo (const MeshKernel &rclM);
explicit MeshInfo (const MeshKernel &rclM);
virtual ~MeshInfo () {}
/**
* Writes general information about the mesh structure into the stream.

View File

@@ -51,7 +51,7 @@ public:
/** @name Construction */
//@{
/// construction
inline MeshFacetIterator (const MeshKernel &rclM);
inline explicit MeshFacetIterator (const MeshKernel &rclM);
/// construction
inline MeshFacetIterator (const MeshKernel &rclM, FacetIndex ulPos);
/// construction
@@ -175,7 +175,7 @@ class MeshExport MeshPointIterator
public:
/** @name Construction */
//@{
inline MeshPointIterator (const MeshKernel &rclM);
inline explicit MeshPointIterator (const MeshKernel &rclM);
inline MeshPointIterator (const MeshKernel &rclM, PointIndex ulPos);
inline MeshPointIterator (const MeshPointIterator &rclI);
//@}
@@ -271,7 +271,7 @@ protected:
class MeshFastFacetIterator
{
public:
inline MeshFastFacetIterator (const MeshKernel &rclM);
inline explicit MeshFastFacetIterator (const MeshKernel &rclM);
virtual ~MeshFastFacetIterator () {}
void Init () { _clIter = _rclFAry.begin(); }

View File

@@ -33,8 +33,8 @@ class MeshExport MeshKDTree
{
public:
MeshKDTree();
MeshKDTree(const std::vector<Base::Vector3f>& points);
MeshKDTree(const MeshPointArray& points);
explicit MeshKDTree(const std::vector<Base::Vector3f>& points);
explicit MeshKDTree(const MeshPointArray& points);
~MeshKDTree();
void AddPoint(Base::Vector3f& point);

View File

@@ -92,7 +92,7 @@ struct MeshExport Group
class MeshExport MeshInput
{
public:
MeshInput (MeshKernel &rclM)
explicit MeshInput (MeshKernel &rclM)
: _rclMesh(rclM), _material(nullptr){}
MeshInput (MeshKernel &rclM, Material* m)
: _rclMesh(rclM), _material(m){}
@@ -151,7 +151,7 @@ protected:
class MeshExport MeshOutput
{
public:
MeshOutput (const MeshKernel &rclM)
explicit MeshOutput (const MeshKernel &rclM)
: _rclMesh(rclM), _material(nullptr), apply_transform(false){}
MeshOutput (const MeshKernel &rclM, const Material* m)
: _rclMesh(rclM), _material(m), apply_transform(false){}

View File

@@ -46,7 +46,7 @@ class MeshGeomFacet;
class MeshExport MeshProjection
{
public:
MeshProjection(const MeshKernel&);
explicit MeshProjection(const MeshKernel&);
~MeshProjection();
bool projectLineOnMesh(const MeshFacetGrid& grid, const Base::Vector3f& p1, FacetIndex f1,

View File

@@ -40,7 +40,7 @@ typedef std::vector<FacetIndex> MeshSegment;
class MeshExport MeshSurfaceSegment
{
public:
MeshSurfaceSegment(unsigned long minFacets)
explicit MeshSurfaceSegment(unsigned long minFacets)
: minFacets(minFacets) {}
virtual ~MeshSurfaceSegment() {}
virtual bool TestFacet (const MeshFacet &rclFacet) const = 0;
@@ -269,7 +269,7 @@ protected:
class MeshExport MeshSegmentAlgorithm
{
public:
MeshSegmentAlgorithm(const MeshKernel& kernel) : myKernel(kernel) {}
explicit MeshSegmentAlgorithm(const MeshKernel& kernel) : myKernel(kernel) {}
void FindSegments(std::vector<MeshSurfaceSegmentPtr>&);
private:

View File

@@ -50,7 +50,7 @@ public:
C2
};
AbstractSmoothing(MeshKernel&);
explicit AbstractSmoothing(MeshKernel&);
virtual ~AbstractSmoothing();
void initialize(Component comp, Continuity cont);
@@ -68,7 +68,7 @@ protected:
class MeshExport PlaneFitSmoothing : public AbstractSmoothing
{
public:
PlaneFitSmoothing(MeshKernel&);
explicit PlaneFitSmoothing(MeshKernel&);
~PlaneFitSmoothing() override;
void SetMaximum(float max) {
maximum = max;
@@ -83,7 +83,7 @@ private:
class MeshExport LaplaceSmoothing : public AbstractSmoothing
{
public:
LaplaceSmoothing(MeshKernel&);
explicit LaplaceSmoothing(MeshKernel&);
~LaplaceSmoothing() override;
void Smooth(unsigned int) override;
void SmoothPoints(unsigned int, const std::vector<PointIndex>&) override;
@@ -103,7 +103,7 @@ protected:
class MeshExport TaubinSmoothing : public LaplaceSmoothing
{
public:
TaubinSmoothing(MeshKernel&);
explicit TaubinSmoothing(MeshKernel&);
~TaubinSmoothing() override;
void Smooth(unsigned int) override;
void SmoothPoints(unsigned int, const std::vector<PointIndex>&) override;
@@ -121,7 +121,7 @@ protected:
class MeshExport MedianFilterSmoothing : public AbstractSmoothing
{
public:
MedianFilterSmoothing(MeshKernel&);
explicit MedianFilterSmoothing(MeshKernel&);
~MedianFilterSmoothing() override;
void SetWeight(int w) {
weights = w;

View File

@@ -43,7 +43,7 @@ namespace MeshCore {
class MeshSearchNeighbours
{
public:
MeshSearchNeighbours ( const MeshKernel &rclM, float fSampleDistance = 1.0f);
explicit MeshSearchNeighbours ( const MeshKernel &rclM, float fSampleDistance = 1.0f);
virtual ~MeshSearchNeighbours () {}
/** Re-initilaizes internal structures. */
void Reinit (float fSampleDistance);
@@ -69,7 +69,7 @@ protected:
struct CDistRad
{
CDistRad (const Base::Vector3f clCenter) : _clCenter(clCenter) {}
explicit CDistRad (const Base::Vector3f clCenter) : _clCenter(clCenter) {}
bool operator()(const Base::Vector3f &rclPt1, const Base::Vector3f &rclPt2) { return Base::DistanceP2(_clCenter, rclPt1) < Base::DistanceP2(_clCenter, rclPt2); }
Base::Vector3f _clCenter;
};
@@ -144,7 +144,7 @@ inline bool MeshSearchNeighbours::TriangleCutsSphere (const MeshFacet &rclF) con
class MeshFaceIterator
{
public:
MeshFaceIterator(const MeshKernel& mesh)
explicit MeshFaceIterator(const MeshKernel& mesh)
: it(mesh) {}
Base::Vector3f operator() (FacetIndex index)
{
@@ -159,7 +159,7 @@ private:
class MeshVertexIterator
{
public:
MeshVertexIterator(const MeshKernel& mesh)
explicit MeshVertexIterator(const MeshKernel& mesh)
: it(mesh) {}
Base::Vector3f operator() (PointIndex index)
{

View File

@@ -52,7 +52,7 @@ class MeshExport MeshTopoAlgorithm
{
public:
// construction/destruction
MeshTopoAlgorithm (MeshKernel &rclM);
explicit MeshTopoAlgorithm (MeshKernel &rclM);
virtual ~MeshTopoAlgorithm ();
public:
@@ -336,7 +336,7 @@ class MeshExport MeshComponents
public:
enum TMode {OverEdge, OverPoint};
MeshComponents( const MeshKernel& rclMesh );
explicit MeshComponents( const MeshKernel& rclMesh );
~MeshComponents();
/**

View File

@@ -222,7 +222,7 @@ protected:
class MeshExport ConstraintDelaunayTriangulator : public AbstractPolygonTriangulator
{
public:
ConstraintDelaunayTriangulator(float area);
explicit ConstraintDelaunayTriangulator(float area);
~ConstraintDelaunayTriangulator() override;
protected:

View File

@@ -35,7 +35,7 @@ namespace MeshCore {
class MeshExport MeshTrimByPlane
{
public:
MeshTrimByPlane(MeshKernel& mesh);
explicit MeshTrimByPlane(MeshKernel& mesh);
~MeshTrimByPlane();
public:

View File

@@ -33,7 +33,7 @@ template <>
struct vec_traits<Wm4::Vector3d> {
typedef Wm4::Vector3d vec_type;
typedef double float_type;
vec_traits(const vec_type& v) : v(v){}
explicit vec_traits(const vec_type& v) : v(v){}
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}
@@ -45,7 +45,7 @@ template <>
struct vec_traits<Wm4::Vector3f> {
typedef Wm4::Vector3f vec_type;
typedef float float_type;
vec_traits(const vec_type& v) : v(v){}
explicit vec_traits(const vec_type& v) : v(v){}
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}

View File

@@ -43,7 +43,7 @@ class MeshObject;
class MeshExport Facet : public MeshCore::MeshGeomFacet
{
public:
Facet(const MeshCore::MeshFacet& face = MeshCore::MeshFacet(), const MeshObject* obj = nullptr, MeshCore::FacetIndex index = MeshCore::FACET_INDEX_MAX);
explicit Facet(const MeshCore::MeshFacet& face = MeshCore::MeshFacet(), const MeshObject* obj = nullptr, MeshCore::FacetIndex index = MeshCore::FACET_INDEX_MAX);
Facet(const Facet& f);
~Facet();

View File

@@ -42,7 +42,7 @@ class Feature;
class Importer
{
public:
Importer(App::Document*);
explicit Importer(App::Document*);
~Importer() = default;
void load(const std::string& fileName);

View File

@@ -49,7 +49,7 @@ class MeshExport MeshPoint : public Vector3d
public:
/// simple constructor
MeshPoint(const Vector3d& vec = Vector3d(), const MeshObject* obj = nullptr, unsigned int index = UINT_MAX)
explicit MeshPoint(const Vector3d& vec = Vector3d(), const MeshObject* obj = nullptr, unsigned int index = UINT_MAX)
:Vector3d(vec),Index(index),Mesh(obj)
{}

View File

@@ -54,7 +54,7 @@ using namespace Mesh;
struct MeshPropertyLock {
MeshPropertyLock(PropertyMeshKernel* p) : prop(p)
explicit MeshPropertyLock(PropertyMeshKernel* p) : prop(p)
{ if (prop) prop->startEditing(); }
~MeshPropertyLock()
{ if (prop) prop->finishEditing(); }