Salome HOME
#18963 Minimize compiler warnings (finish)
authoreap <eap@opencascade.com>
Thu, 10 Dec 2020 09:35:57 +0000 (12:35 +0300)
committereap <eap@opencascade.com>
Thu, 10 Dec 2020 09:35:57 +0000 (12:35 +0300)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx
src/GHS3DPlugin/GHS3DPlugin_Optimizer.hxx
src/GHS3DPlugin/MG_Tetra_API.cxx
src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx

index f3397736a57b54f3e471225c5a16d9c90e670c02..0030d608a86f60efda5162e79121579ae2d50675 100644 (file)
@@ -691,7 +691,7 @@ static bool readGMFFile(MG_Tetra_API*                   MGOutput,
   std::vector< const SMDS_MeshElement* > foundVolumes;
   if ( !hasGeom && theHelper->GetMesh()->NbVolumes() > 0 )
     elemSearcher = SMESH_MeshAlgos::GetElementSearcher( *theMeshDS );
-  unique_ptr< SMESH_ElementSearcher > elemSearcherDeleter( elemSearcher ); //auto_ptr
+  unique_ptr< SMESH_ElementSearcher > elemSearcherDeleter( elemSearcher );
 
   // IMP 0022172: [CEA 790] create the groups corresponding to domains
   std::vector< std::vector< const SMDS_MeshElement* > > elemsOfDomain;
@@ -1722,8 +1722,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
   TCollection_AsciiString aSmdsToGhs3dIdMapFileName;
   aSmdsToGhs3dIdMapFileName = aGenericName + ".ids";  // ids relation
   ofstream aIdsFile  ( aSmdsToGhs3dIdMapFileName.ToCString()  , ios::out);
-  Ok = aIdsFile.rdbuf()->is_open();
-  if (!Ok) {
+  if ( !aIdsFile.rdbuf()->is_open() ) {
     INFOS( "Can't write into " << aSmdsToGhs3dIdMapFileName);
     //return error(SMESH_Comment("Can't write into ") << aSmdsToGhs3dIdMapFileName);
   }
index cea0d57aca1cd37cd9d2bbac101bf77a02e42ee4..21c09a2ece635a04f10b9ca1cbac71559c8cf43b 100644 (file)
@@ -44,7 +44,7 @@ public:
 
   virtual bool Compute(SMESH_Mesh&         theMesh,
                        SMESH_MesherHelper* theHelper);
-  virtual bool Compute(SMESH_Mesh &        aMesh,
+  virtual bool Compute(SMESH_Mesh &         aMesh,
                        const TopoDS_Shape & aShape);
 
   static const char* Name() { return "MG-Tetra Optimization"; }
index 4503061662483769d205eeac4257bc2946f73917..258a081342c65945262760c24af56094cf832833 100644 (file)
@@ -695,7 +695,9 @@ struct MG_Tetra_API::LibData // to avoid compiler warnings
 {
   volatile bool& _cancelled_flag;
   double& _progress;
-  LibData(volatile bool& cancelled_flag, double& progress): _cancelled_flag{cancelled_flag}, _progress{progress} {}
+  LibData(volatile bool& cancelled_flag, double& progress):
+    _cancelled_flag{cancelled_flag}, _progress{progress}
+  {}
 };
 
 #endif // ifdef USE_MG_LIBS
index 86295da07486ecd058a5d49ea04460d5561dcadc..50e6003084c2d8a6dbc228ed25e3775e46b30567 100644 (file)
@@ -1038,7 +1038,7 @@ void GHS3DPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, dou
 {
   myEnforcedTableWidget->disconnect(SIGNAL( itemChanged(QTableWidgetItem *)));
   bool okToCreate = true;
-  double itemX=0.,itemY=0.,itemZ=0.,itemSize = 0; // todo: itemX, itemY, itemZ must be explicitly initialized to avoid warning (see below)
+  double itemX=0.,itemY=0.,itemZ=0.,itemSize = 0;
   QString itemEntry, itemGroupName = QString("");
   //   bool itemIsCompound;
   int rowCount = myEnforcedTableWidget->rowCount();
@@ -1083,7 +1083,7 @@ void GHS3DPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, dou
       break;
 
 
-    if (( !isCompound && ((itemX == x) && (itemY == y) && (itemZ == z))) || // todo: itemX, itemY, itemZ must be explicitly initialized to avoid warning (see above)
+    if (( !isCompound && ((itemX == x) && (itemY == y) && (itemZ == z))) ||
         ( !itemEntry.isEmpty() && ( itemEntry == geomEntry.c_str() )))
     {
       // update size
@@ -1864,7 +1864,7 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD
       _PTR(SObject) aSObj = aStudy->FindObjectID(enfMesh->entry.c_str());
       SMESH::SMESH_IDSource_var theSource = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( aSObj );
 
-      SMESH::ElementType elementType = SMESH::NODE; // todo: elementType must be explicitly initialized to avoid warning (see below)
+      SMESH::ElementType elementType = SMESH::NODE;
       switch(enfMesh->elementType) {
       case 0:
         elementType = SMESH::NODE;
@@ -1879,7 +1879,7 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD
         break;
       }
 
-      ok = h->p_SetEnforcedMesh(theSource, elementType, enfMesh->name.c_str(), enfMesh->groupName.c_str()); // todo: elementType must be explicitly initialized to avoid warning (see above)
+      ok = h->p_SetEnforcedMesh(theSource, elementType, enfMesh->name.c_str(), enfMesh->groupName.c_str());
     } // for
   } // try
   catch ( const SALOME::SALOME_Exception& ex )