From 013d1be117aac8c7c75491ae51cf603c51bdc324 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 22 Oct 2020 15:14:04 +0300 Subject: [PATCH] fight warnings c++17, additional corrections --- src/GUI/NETGENPluginGUI_HypothesisCreator.h | 2 +- src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx | 2 +- src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx | 4 ++-- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 10 +++++----- src/NETGENPlugin/NETGENPlugin_Mesher.hxx | 2 +- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 2 +- src/NETGENPlugin/NETGENPlugin_Remesher_2D.hxx | 8 ++++---- .../NETGENPlugin_SimpleHypothesis_2D_i.hxx | 4 ++-- src/NETGENPlugin/NETGENPlugin_i.cxx | 1 - 9 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.h b/src/GUI/NETGENPluginGUI_HypothesisCreator.h index 89004b8..f5f7ded 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.h +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.h @@ -63,7 +63,7 @@ public: NETGENPluginGUI_HypothesisCreator( const QString& ); virtual ~NETGENPluginGUI_HypothesisCreator(); - virtual bool checkParams(QString& /*msg*/) const; + virtual bool checkParams(QString&) const; virtual QString helpPage() const; protected: diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx index 7b8afae..37009f6 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx @@ -156,7 +156,7 @@ public: * \param theShape - the geometry of interest * \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. diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx index 614bf6e..e38b809 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx @@ -133,11 +133,11 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i: // Return geometry this hypothesis depends on. Return false if there is no geometry parameter 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() virtual bool setObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & /*subIDArray*/ ); + std::vector< int > & subIDArray ); protected: diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 48d6383..03df424 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -319,7 +319,7 @@ namespace OCC_CATCH_SIGNALS; BRepMesh_IncrementalMesh e(shape, 0.01, true); } - catch (Standard_Failure) + catch (Standard_Failure&) { } // updated.erase( triangulation.operator->() ); @@ -3163,7 +3163,7 @@ bool NETGENPlugin_Mesher::Compute() comment << text(ex); //err = 1; -- try to make volumes anyway } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { comment << text(exc); //err = 1; -- try to make volumes anyway @@ -3289,7 +3289,7 @@ bool NETGENPlugin_Mesher::Compute() comment << text(ex); err = 1; } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { if ( comment.empty() ) // do not overwrite a previous error comment << text(exc); @@ -3320,7 +3320,7 @@ bool NETGENPlugin_Mesher::Compute() if ( comment.empty() ) // do not overwrite a previous error comment << text(ex); } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { if ( comment.empty() ) // do not overwrite a previous error comment << text(exc); @@ -3361,7 +3361,7 @@ bool NETGENPlugin_Mesher::Compute() if ( comment.empty() ) // do not overwrite a previous error 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 comment << exc.What(); diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx index 1d4e62b..9299dca 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx @@ -132,7 +132,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher bool Evaluate(MapShapeNbElems& aResMap); - double GetProgress(const SMESH_Algo* /*holder*/, + double GetProgress(const SMESH_Algo* holder, const int * algoProgressTic, const double * algoProgress) const; diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 76eef6f..a3425b5 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -519,7 +519,7 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh, str << ": " << ex.GetMessageString(); error(str); } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { SMESH_Comment str("NgException"); if ( strlen( netgen::multithread.task ) > 0 ) diff --git a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.hxx b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.hxx index 3cb6f57..b1fad2a 100644 --- a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.hxx @@ -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*/, const TopoDS_Shape& /*theShape*/); + virtual bool Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theShape); virtual void CancelCompute(); virtual double GetProgress() const; - virtual bool Evaluate(SMESH_Mesh& /*theMesh*/, - const TopoDS_Shape& /*theShape*/, - MapShapeNbElems& /*theResMap*/); + virtual bool Evaluate(SMESH_Mesh& theMesh, + const TopoDS_Shape& theShape, + MapShapeNbElems& theResMap); protected: diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx index dcd47ed..d084768 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx @@ -49,7 +49,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_2D_i: // Destructor virtual ~NETGENPlugin_SimpleHypothesis_2D_i(); - void SetNumberOfSegments(CORBA::Short nb) ; + void SetNumberOfSegments(CORBA::Short nb); CORBA::Short GetNumberOfSegments(); void SetLocalLength(CORBA::Double segmentLength); @@ -79,7 +79,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_2D_i: // method used to convert variable parameters stored in an old study // into myMethod2VarParams. It should return a method name for an index of // 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 diff --git a/src/NETGENPlugin/NETGENPlugin_i.cxx b/src/NETGENPlugin/NETGENPlugin_i.cxx index 11c68c8..5598608 100644 --- a/src/NETGENPlugin/NETGENPlugin_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_i.cxx @@ -86,7 +86,6 @@ extern "C" aCreator = new NETGENPlugin_Creator_i; else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0) aCreator = new NETGENPlugin_Creator_i; - else ; return aCreator; } -- 2.39.2