fight warnings c++17, additional corrections

This commit is contained in:
vsr 2020-10-22 15:14:04 +03:00
parent a7f81ddd39
commit 013d1be117
9 changed files with 17 additions and 18 deletions

View File

@ -63,7 +63,7 @@ public:
NETGENPluginGUI_HypothesisCreator( const QString& ); NETGENPluginGUI_HypothesisCreator( const QString& );
virtual ~NETGENPluginGUI_HypothesisCreator(); virtual ~NETGENPluginGUI_HypothesisCreator();
virtual bool checkParams(QString& /*msg*/) const; virtual bool checkParams(QString&) const;
virtual QString helpPage() const; virtual QString helpPage() const;
protected: protected:

View File

@ -156,7 +156,7 @@ public:
* \param theShape - the geometry of interest * \param theShape - the geometry of interest
* \retval bool - always false * \retval bool - always false
*/ */
virtual bool SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/); virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*! /*!
* \brief Initialize my parameter values by default parameters. * \brief Initialize my parameter values by default parameters.

View File

@ -133,11 +133,11 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
// Return geometry this hypothesis depends on. Return false if there is no geometry parameter // Return geometry this hypothesis depends on. Return false if there is no geometry parameter
virtual bool getObjectsDependOn( std::vector< std::string > & entryArray, virtual bool getObjectsDependOn( std::vector< std::string > & entryArray,
std::vector< int > & /*subIDArray*/ ) const; std::vector< int > & subIDArray ) const;
// Set new geometry instead of that returned by getObjectsDependOn() // Set new geometry instead of that returned by getObjectsDependOn()
virtual bool setObjectsDependOn( std::vector< std::string > & entryArray, virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
std::vector< int > & /*subIDArray*/ ); std::vector< int > & subIDArray );
protected: protected:

View File

@ -319,7 +319,7 @@ namespace
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
BRepMesh_IncrementalMesh e(shape, 0.01, true); BRepMesh_IncrementalMesh e(shape, 0.01, true);
} }
catch (Standard_Failure) catch (Standard_Failure&)
{ {
} }
// updated.erase( triangulation.operator->() ); // updated.erase( triangulation.operator->() );
@ -3163,7 +3163,7 @@ bool NETGENPlugin_Mesher::Compute()
comment << text(ex); comment << text(ex);
//err = 1; -- try to make volumes anyway //err = 1; -- try to make volumes anyway
} }
catch (netgen::NgException exc) catch (netgen::NgException& exc)
{ {
comment << text(exc); comment << text(exc);
//err = 1; -- try to make volumes anyway //err = 1; -- try to make volumes anyway
@ -3289,7 +3289,7 @@ bool NETGENPlugin_Mesher::Compute()
comment << text(ex); comment << text(ex);
err = 1; err = 1;
} }
catch (netgen::NgException exc) catch (netgen::NgException& exc)
{ {
if ( comment.empty() ) // do not overwrite a previous error if ( comment.empty() ) // do not overwrite a previous error
comment << text(exc); comment << text(exc);
@ -3320,7 +3320,7 @@ bool NETGENPlugin_Mesher::Compute()
if ( comment.empty() ) // do not overwrite a previous error if ( comment.empty() ) // do not overwrite a previous error
comment << text(ex); comment << text(ex);
} }
catch (netgen::NgException exc) catch (netgen::NgException& exc)
{ {
if ( comment.empty() ) // do not overwrite a previous error if ( comment.empty() ) // do not overwrite a previous error
comment << text(exc); comment << text(exc);
@ -3361,7 +3361,7 @@ bool NETGENPlugin_Mesher::Compute()
if ( comment.empty() ) // do not overwrite a previous error if ( comment.empty() ) // do not overwrite a previous error
comment << "Exception in netgen at passing to 2nd order "; comment << "Exception in netgen at passing to 2nd order ";
} }
catch (netgen::NgException exc) catch (netgen::NgException& exc)
{ {
if ( comment.empty() ) // do not overwrite a previous error if ( comment.empty() ) // do not overwrite a previous error
comment << exc.What(); comment << exc.What();

View File

@ -132,7 +132,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
bool Evaluate(MapShapeNbElems& aResMap); bool Evaluate(MapShapeNbElems& aResMap);
double GetProgress(const SMESH_Algo* /*holder*/, double GetProgress(const SMESH_Algo* holder,
const int * algoProgressTic, const int * algoProgressTic,
const double * algoProgress) const; const double * algoProgress) const;

View File

@ -519,7 +519,7 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh,
str << ": " << ex.GetMessageString(); str << ": " << ex.GetMessageString();
error(str); error(str);
} }
catch (netgen::NgException exc) catch (netgen::NgException& exc)
{ {
SMESH_Comment str("NgException"); SMESH_Comment str("NgException");
if ( strlen( netgen::multithread.task ) > 0 ) if ( strlen( netgen::multithread.task ) > 0 )

View File

@ -43,16 +43,16 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Remesher_2D: public SMESH_2D_Algo
virtual bool Compute(SMESH_Mesh & theMesh, SMESH_MesherHelper* theHelper); virtual bool Compute(SMESH_Mesh & theMesh, SMESH_MesherHelper* theHelper);
virtual bool Compute(SMESH_Mesh& /*theMesh*/, const TopoDS_Shape& /*theShape*/); virtual bool Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theShape);
virtual void CancelCompute(); virtual void CancelCompute();
virtual double GetProgress() const; virtual double GetProgress() const;
virtual bool Evaluate(SMESH_Mesh& /*theMesh*/, virtual bool Evaluate(SMESH_Mesh& theMesh,
const TopoDS_Shape& /*theShape*/, const TopoDS_Shape& theShape,
MapShapeNbElems& /*theResMap*/); MapShapeNbElems& theResMap);
protected: protected:

View File

@ -79,7 +79,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_2D_i:
// method used to convert variable parameters stored in an old study // method used to convert variable parameters stored in an old study
// into myMethod2VarParams. It should return a method name for an index of // into myMethod2VarParams. It should return a method name for an index of
// variable parameters. Index is countered from zero // variable parameters. Index is countered from zero
virtual std::string getMethodOfParameter(const int paramIndex, int /*nbVars*/) const; virtual std::string getMethodOfParameter(const int paramIndex, int nbVars) const;
// Methods for copying mesh definition to other geometry // Methods for copying mesh definition to other geometry

View File

@ -86,7 +86,6 @@ extern "C"
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_SimpleHypothesis_3D_i>; aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_SimpleHypothesis_3D_i>;
else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0) else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0)
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_RemesherHypothesis_2D_i>; aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_RemesherHypothesis_2D_i>;
else ;
return aCreator; return aCreator;
} }