]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
#18963 Minimize compiler warnings
authorSALOME <salome@opencascade.com>
Fri, 21 Aug 2020 10:42:17 +0000 (13:42 +0300)
committervsr <vsr@opencascade.com>
Tue, 8 Dec 2020 16:02:50 +0000 (19:02 +0300)
14 files changed:
src/GUI/NETGENPluginGUI_HypothesisCreator.cxx
src/GUI/NETGENPluginGUI_HypothesisCreator.h
src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx
src/NETGENPlugin/NETGENPlugin_Mesher.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx
src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.cxx
src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.hxx
src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.cxx
src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx
src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_3D_i.hxx
src/NETGENPlugin/NETGENPlugin_i.cxx

index 2fa8a999b4111be2fc6ad19fa83211c5c09a44f8..08f59621d20dd2a02db1dd447ff76dbc1f290cc1 100644 (file)
@@ -116,7 +116,7 @@ NETGENPluginGUI_HypothesisCreator::~NETGENPluginGUI_HypothesisCreator()
 {
 }
 
-bool NETGENPluginGUI_HypothesisCreator::checkParams(QString& msg) const
+bool NETGENPluginGUI_HypothesisCreator::checkParams(QString& /*msg*/) const
 {
   NetgenHypothesisData data_old, data_new;
   readParamsFromHypo( data_old );
index 48461728732cc62ac905ab5f6a5d4099d533960e..f5f7ded0dd611487710270eb98a579eecdcc558b 100644 (file)
@@ -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:
index 2eabac4207ef274318c5ee02e1cde055f010f708..8c58e3b360a24a81bda87c923ba6d937d96f0939 100644 (file)
@@ -642,8 +642,8 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
  * \retval bool - always false
  */
 //================================================================================
-bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh*   theMesh,
-                                                  const TopoDS_Shape& theShape)
+bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh*   /*theMesh*/,
+                                                  const TopoDS_Shape& /*theShape*/)
 {
   return false;
 }
index e10cf8b4481b145f92dd8f8e01ea3b047d6d39b1..fa4b04c1820a95d8d7bd4759d61d34b5ecde37a0 100644 (file)
@@ -337,7 +337,6 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetChordalError()
 
 void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj,
                                                     CORBA::Double         localSize)
-  throw (SALOME::SALOME_Exception)
 {
   string entry;
   entry = GeomObj->GetStudyEntry();
@@ -712,7 +711,7 @@ std::string NETGENPlugin_Hypothesis_i::getMethodOfParameter(const int paramIndex
 
 bool
 NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entryArray,
-                                               std::vector< int >         & subIDArray ) const
+                                               std::vector< int >         & /*subIDArray*/ ) const
 {
   typedef ::NETGENPlugin_Hypothesis THyp;
 
@@ -734,7 +733,7 @@ NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entr
 
 bool
 NETGENPlugin_Hypothesis_i::setObjectsDependOn( std::vector< std::string > & entryArray,
-                                               std::vector< int >         & subIDArray )
+                                               std::vector< int >         & /*subIDArray*/ )
 {
   typedef ::NETGENPlugin_Hypothesis THyp;
 
index d1f54b6b03e1ff598e08c27aa1b7cc30a8f16f13..e38b80908d62fab71a247cc7083c9d0133102f83 100644 (file)
@@ -83,8 +83,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
   void SetChordalError(CORBA::Double value);
   CORBA::Double GetChordalError();
 
-  void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize)
-    throw (SALOME::SALOME_Exception);
+  void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize);
   void SetLocalSizeOnEntry(const char* entry, CORBA::Double localSize);
   CORBA::Double GetLocalSizeOnEntry(const char* entry);
   NETGENPlugin::string_array* GetLocalSizeEntries();
index 8caf0bf4e127c34aabcd187d0d7da3a21e2416c0..03df4247fe656c69cbf46179bd317f1ebef276ee 100644 (file)
@@ -205,7 +205,7 @@ namespace
 
   list< TopoDS_Edge > getConnectedEdges( const TopoDS_Edge&                 edge,
                                          const TopoDS_Face&                 face,
-                                         const set< SMESH_subMesh* > &      computedSM,
+                                         const set< SMESH_subMesh* > &      /*computedSM*/,
                                          const SMESH_MesherHelper&          helper,
                                          map< SMESH_subMesh*, set< int > >& addedEdgeSM2Faces)
   {
@@ -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();
@@ -3712,7 +3712,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap)
   return true;
 }
 
-double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* holder,
+double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* /*holder*/,
                                         const int *       algoProgressTic,
                                         const double *    algoProgress) const
 {
index 76eef6f44ff81c861c4a3010bbce5bbbc71c5588..a3425b50609206dfb52f1ead47b98c3fcff3be66 100644 (file)
@@ -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 )
index c51e06fa03df31155031e7a71281e2aa6a90d644..6c662b343aaf92f83bad667ddabad9d41f0384f9 100644 (file)
@@ -852,8 +852,8 @@ bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh&         theMesh,
  */
 //=============================================================================
 
-bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh&         theMesh,
-                                       const TopoDS_Shape& theShape)
+bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh&         /*theMesh*/,
+                                       const TopoDS_Shape& /*theShape*/)
 {
   return false;
 }
@@ -887,9 +887,9 @@ double NETGENPlugin_Remesher_2D::GetProgress() const
  */
 //=============================================================================
 
-bool NETGENPlugin_Remesher_2D::Evaluate(SMESH_Mesh&         aMesh,
-                                        const TopoDS_Shape& aShape,
-                                        MapShapeNbElems& aResMap)
+bool NETGENPlugin_Remesher_2D::Evaluate(SMESH_Mesh&         /*aMesh*/,
+                                        const TopoDS_Shape& /*aShape*/,
+                                        MapShapeNbElems& /*aResMap*/)
 {
   return false;
 }
index c7b192c6d05c5679816557f911dc1ca6a30b86a5..a457183d2b00b7afb5d665e7289d2a4c9d57ba5f 100644 (file)
@@ -59,7 +59,7 @@ NETGENPlugin_SimpleHypothesis_2D::NETGENPlugin_SimpleHypothesis_2D (int
  *  
  */
 //=============================================================================
-void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb) throw (SALOME_Exception)
+void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb)
 {
   if ( nb < 1 )
     throw SALOME_Exception("Number of segments must be positive");
@@ -77,7 +77,6 @@ void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb) throw (SALOME
  */
 //=============================================================================
 void NETGENPlugin_SimpleHypothesis_2D::SetLocalLength(double segmentLength)
-  throw (SALOME_Exception)
 {
   if ( segmentLength < DBL_MIN )
     throw SALOME_Exception("segment length must be more than zero");
index 3ad17442abb6a6050e314c8c677255d9b2e6af7d..c5f075d0bd38c63fd6c50a33033264a4304527a8 100644 (file)
@@ -43,7 +43,7 @@ public:
   /*!
    * Sets <number of segments> value
    */
-  void SetNumberOfSegments(int nb) throw (SALOME_Exception);
+  void SetNumberOfSegments(int nb);
   /*!
    * Returns <number of segments> value.
    * Can be zero in case if LocalLength() has been set
@@ -53,7 +53,7 @@ public:
   /*!
    * Sets <segment length> value
    */
-  void SetLocalLength(double segmentLength) throw (SALOME_Exception);
+  void SetLocalLength(double segmentLength);
   /*!
    * Returns <segment length> value.
    * Can be zero in case if NumberOfSegments() has been set
index 68b087b2b6cd34cca044d8005788c85144e5fb68..dbd3b98cb8023ca8cab9c961b660c27b8ac645ef 100644 (file)
@@ -72,7 +72,6 @@ NETGENPlugin_SimpleHypothesis_2D_i::~NETGENPlugin_SimpleHypothesis_2D_i()
  */
 //=============================================================================
 void NETGENPlugin_SimpleHypothesis_2D_i::SetNumberOfSegments(CORBA::Short nb)
-  throw ( SALOME::SALOME_Exception )
 {
   ASSERT(myBaseImpl);
   try {
@@ -237,7 +236,7 @@ int NETGENPlugin_SimpleHypothesis_2D_i::getParamIndex(const TCollection_AsciiStr
 //================================================================================
 
 std::string NETGENPlugin_SimpleHypothesis_2D_i::getMethodOfParameter(const int paramIndex,
-                                                                     int nbVars) const
+                                                                     int /*nbVars*/) const
 {
   switch ( paramIndex ) {
   case 0: return GetImpl()->GetNumberOfSegments() ? "SetNumberOfSegments" : "SetLocalLength";
index 24e9ef981fb7829cca7ff50c346db87ee374c3f9..d0847685282272a8e08c345a81875c7da6c7812d 100644 (file)
@@ -49,7 +49,7 @@ class NETGENPLUGIN_EXPORT  NETGENPlugin_SimpleHypothesis_2D_i:
   // Destructor
   virtual ~NETGENPlugin_SimpleHypothesis_2D_i();
 
-  void SetNumberOfSegments(CORBA::Short nb) throw ( SALOME::SALOME_Exception );
+  void SetNumberOfSegments(CORBA::Short nb);
   CORBA::Short GetNumberOfSegments();
 
   void SetLocalLength(CORBA::Double segmentLength);
@@ -85,12 +85,12 @@ class NETGENPLUGIN_EXPORT  NETGENPlugin_SimpleHypothesis_2D_i:
   // Methods for copying mesh definition to other geometry
 
   // 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 { return 0; }
+  virtual bool getObjectsDependOn( std::vector< std::string > & /*entryArray*/,
+                                   std::vector< int >         & /*subIDArray*/ ) const { return 0; }
 
   // Set new geometry instead of that returned by getObjectsDependOn()
-  virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
-                                   std::vector< int >         & subIDArray ) { return true; }
+  virtual bool setObjectsDependOn( std::vector< std::string > & /*entryArray*/,
+                                   std::vector< int >         & /*subIDArray*/ ) { return true; }
 };
 
 #endif
index e6f84965c2ab6673708295dc0a447124fceb392c..4994e54f91afe39de4fe21a76dd289bcfe2475bc 100644 (file)
@@ -63,12 +63,12 @@ class NETGENPLUGIN_EXPORT  NETGENPlugin_SimpleHypothesis_3D_i:
   // Methods for copying mesh definition to other geometry
 
   // 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 { return 0; }
+  virtual bool getObjectsDependOn( std::vector< std::string > & /*entryArray*/,
+                                   std::vector< int >         & /*subIDArray*/ ) const { return 0; }
 
   // Set new geometry instead of that returned by getObjectsDependOn()
-  virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
-                                   std::vector< int >         & subIDArray ) { return true; }
+  virtual bool setObjectsDependOn( std::vector< std::string > & /*entryArray*/,
+                                   std::vector< int >         & /*subIDArray*/ ) { return true; }
 };
 
 #endif
index 11c68c82dd41ec9bce990b86c9365e425ddcb9e6..5598608399bf86d1ea477b0d7160fcc073f9c9d2 100644 (file)
@@ -86,7 +86,6 @@ extern "C"
       aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_SimpleHypothesis_3D_i>;
     else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0)
       aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_RemesherHypothesis_2D_i>;
-    else ;
 
     return aCreator;
   }