From: SALOME Date: Wed, 26 Aug 2020 06:52:46 +0000 (+0300) Subject: fight warnings c++17, fix minor warnings. Build GHS3DPLUGIN finished X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad6ddc551f1066a011ceef750d296bea9a124c48;p=plugins%2Fghs3dplugin.git fight warnings c++17, fix minor warnings. Build GHS3DPLUGIN finished --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 1f11791..b4f61e9 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -440,7 +440,7 @@ static int findShapeID(SMESH_Mesh& mesh, static void addElemInMeshGroup(SMESH_Mesh* theMesh, const SMDS_MeshElement* anElem, std::string& groupName, - std::set& groupsToRemove) + std::set& /*groupsToRemove*/) { if ( !anElem ) return; // issue 0021776 @@ -584,7 +584,7 @@ static bool readGMFFile(MG_Tetra_API* MGOutput, SMESH_MesherHelper* theHelper, std::vector & theNodeByGhs3dId, std::vector & theFaceByGhs3dId, - map & theNodeToGhs3dIdMap, + map & /*theNodeToGhs3dIdMap*/, std::vector & aNodeGroupByGhs3dId, std::vector & anEdgeGroupByGhs3dId, std::vector & aFaceGroupByGhs3dId, @@ -2871,9 +2871,9 @@ namespace */ void ProcessEvent(const int event, const int eventType, - SMESH_subMesh* subMesh, + SMESH_subMesh* /*subMesh*/, SMESH_subMeshEventListenerData* data, - const SMESH_Hypothesis* hyp) + const SMESH_Hypothesis* /*hyp*/) { if ( SMESH_subMesh::SUBMESH_LOADED == event && SMESH_subMesh::COMPUTE_EVENT == eventType && @@ -2913,11 +2913,11 @@ namespace /*! * \brief Treat events of the subMesh */ - void ProcessEvent(const int event, + void ProcessEvent(const int /*event*/, const int eventType, SMESH_subMesh* subMesh, - SMESH_subMeshEventListenerData* data, - const SMESH_Hypothesis* hyp) + SMESH_subMeshEventListenerData* /*data*/, + const SMESH_Hypothesis* /*hyp*/) { if (SMESH_subMesh::ALGO_EVENT == eventType && !subMesh->GetAlgo() ) diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx index 2b8824e..7266e64 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx @@ -1219,7 +1219,7 @@ bool GHS3DPlugin_Hypothesis_i::SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSour /*! * \brief OBSOLETE FUNCTION - Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size. The elements will be grouped in theGroupName. */ -bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize, const char* theGroupName) +bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double /*theSize*/, const char* theGroupName) { return p_SetEnforcedMesh(theSource, theType, "", theGroupName); @@ -1228,7 +1228,7 @@ bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSourc /*! * \brief OBSOLETE FUNCTION - Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size. */ -bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize) +bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double /*theSize*/) { return p_SetEnforcedMesh(theSource, theType); @@ -1381,7 +1381,7 @@ CORBA::Boolean GHS3DPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type ) bool GHS3DPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) const + std::vector< int > & /*subIDArray*/ ) const { typedef ::GHS3DPlugin_Hypothesis THyp; const THyp* h = static_cast< const THyp*>( myBaseImpl ); @@ -1442,7 +1442,7 @@ GHS3DPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entry bool GHS3DPlugin_Hypothesis_i::setObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) + std::vector< int > & /*subIDArray*/ ) { typedef ::GHS3DPlugin_Hypothesis THyp; THyp* h = static_cast< THyp*>( myBaseImpl ); diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx index b764486..d039b6f 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx @@ -200,8 +200,8 @@ class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i: bool SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, const char* theGroupName) ; /* OBSOLETE FUNCTIONS */ - bool SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double size) ; - bool SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double size, const char* theGroupName) ; + bool SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double /*size*/) ; + bool SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType elementType, double /*size*/, const char* theGroupName) ; /* OBSOLETE FUNCTIONS */ GHS3DPlugin::GHS3DEnforcedMeshList* GetEnforcedMeshes(); @@ -223,11 +223,11 @@ class GHS3DPLUGIN_EXPORT GHS3DPlugin_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*/ ); }; #endif diff --git a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx index b261079..191c489 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx @@ -84,8 +84,8 @@ void GHS3DPlugin_Optimizer::CancelCompute() */ //================================================================================ -bool GHS3DPlugin_Optimizer::Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, - MapShapeNbElems& aResMap) +bool GHS3DPlugin_Optimizer::Evaluate(SMESH_Mesh& /*aMesh*/, const TopoDS_Shape& /*aShape*/, + MapShapeNbElems& /*aResMap*/) { return false; } @@ -95,7 +95,7 @@ bool GHS3DPlugin_Optimizer::Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aSha */ //================================================================================ -bool GHS3DPlugin_Optimizer::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape) +bool GHS3DPlugin_Optimizer::Compute(SMESH_Mesh & /*aMesh*/, const TopoDS_Shape & /*aShape*/) { return false; } diff --git a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.hxx b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.hxx index 21c09a2..fd8d21c 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.hxx @@ -39,13 +39,13 @@ public: virtual void CancelCompute(); bool computeCanceled() { return _computeCanceled; } - virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, - MapShapeNbElems& aResMap); + virtual bool Evaluate(SMESH_Mesh& /*aMesh*/, const TopoDS_Shape& /*aShape*/, + MapShapeNbElems& /*aResMap*/); virtual bool Compute(SMESH_Mesh& theMesh, SMESH_MesherHelper* theHelper); - virtual bool Compute(SMESH_Mesh & aMesh, - const TopoDS_Shape & aShape); + virtual bool Compute(SMESH_Mesh & /*aMesh*/, + const TopoDS_Shape & /*aShape*/); static const char* Name() { return "MG-Tetra Optimization"; } diff --git a/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.cxx b/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.cxx index 5dc0fb4..eea711b 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.cxx @@ -139,14 +139,14 @@ std::istream & GHS3DPlugin_OptimizerHypothesis::LoadFrom(std::istream & load) return load; } -bool GHS3DPlugin_OptimizerHypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh, - const TopoDS_Shape& theShape) +bool GHS3DPlugin_OptimizerHypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, + const TopoDS_Shape& /*theShape*/) { return false; } -bool GHS3DPlugin_OptimizerHypothesis::SetParametersByDefaults(const TDefaults& theDflts, - const SMESH_Mesh* theMesh) +bool GHS3DPlugin_OptimizerHypothesis::SetParametersByDefaults(const TDefaults& /*theDflts*/, + const SMESH_Mesh* /*theMesh*/) { return false; } diff --git a/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.hxx b/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.hxx index d981c09..12f7dfc 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.hxx @@ -68,8 +68,8 @@ public: /*! * \brief Does nothing */ - virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape); - virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0); + virtual bool SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/); + virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* /*theMesh=0*/); static std::string CommandToRun(const GHS3DPlugin_OptimizerHypothesis* hyp); diff --git a/src/GHS3DPlugin/MG_Tetra_API.cxx b/src/GHS3DPlugin/MG_Tetra_API.cxx index c19938f..3e39d27 100644 --- a/src/GHS3DPlugin/MG_Tetra_API.cxx +++ b/src/GHS3DPlugin/MG_Tetra_API.cxx @@ -888,7 +888,7 @@ void MG_Tetra_API::GmfGotoKwd( int iMesh, GmfKwdCod what ) */ //================================================================================ -void MG_Tetra_API::GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int dummy ) +void MG_Tetra_API::GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int /*dummy*/ ) { if ( _useLib ) { #ifdef USE_MG_LIBS diff --git a/src/GHS3DPlugin/MG_Tetra_API.hxx b/src/GHS3DPlugin/MG_Tetra_API.hxx index a1dc4ac..858d9a1 100644 --- a/src/GHS3DPlugin/MG_Tetra_API.hxx +++ b/src/GHS3DPlugin/MG_Tetra_API.hxx @@ -59,7 +59,7 @@ public: int GmfOpenMesh(const char* theFile, int rdOrWr, int * ver, int * dim); int GmfStatKwd( int iMesh, GmfKwdCod what ); void GmfGotoKwd( int iMesh, GmfKwdCod what ); - void GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int dummy ); + void GmfGetLin( int iMesh, GmfKwdCod what, int* nbNodes, int* faceInd, int* ori, int* domain, int /*dummy*/ ); void GmfGetLin(int iMesh, GmfKwdCod what, float* x, float* y, float *z, int* domain ); void GmfGetLin(int iMesh, GmfKwdCod what, double* x, double* y, double *z, int* domain ); void GmfGetLin(int iMesh, GmfKwdCod what, int* node ); diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx index b322ba4..23dc087 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx @@ -1365,7 +1365,7 @@ void GHS3DPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() myEnforcedTableWidget->selectionModel()->clearSelection(); } -void GHS3DPluginGUI_HypothesisCreator::onToMeshHoles(bool isOn) +void GHS3DPluginGUI_HypothesisCreator::onToMeshHoles(bool /*isOn*/) { // myToMakeGroupsOfDomains->setEnabled( isOn ); // if ( !isOn )