Salome HOME
#18963 Minimize compiler warnings (finish)
authoreap <eap@opencascade.com>
Thu, 10 Dec 2020 09:49:30 +0000 (12:49 +0300)
committereap <eap@opencascade.com>
Thu, 10 Dec 2020 09:49:30 +0000 (12:49 +0300)
src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx

index 714f7329a9c401fcb096cf6b14447c7c5b84c14f..12c03d3a173273ed97f2e1d87cac625409d05e1e 100644 (file)
@@ -988,7 +988,7 @@ void HYBRIDPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, do
 {
   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();
@@ -1036,7 +1036,7 @@ void HYBRIDPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, do
       break;
 
 
-    if (( !isCompound && ((itemX == x) && (itemY == y) && (itemZ == z))) || /*( (itemEntry.toStdString() != "") && */ (itemEntry.toStdString() == geomEntry)/*)*/) { // todo: itemX, itemY, itemZ must be explicitly initialized to avoid warning (see above)
+    if (( !isCompound && ((itemX == x) && (itemY == y) && (itemZ == z))) || /*( (itemEntry.toStdString() != "") && */ (itemEntry.toStdString() == geomEntry)/*)*/) {
       // update size
       if (itemSize != size) {
         myEnforcedTableWidget->item(row, ENF_VER_SIZE_COLUMN)->setData( Qt::EditRole, QVariant(size));
@@ -1782,7 +1782,7 @@ bool HYBRIDPluginGUI_HypothesisCreator::storeParamsToHypo( const HYBRIDHypothesi
       _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;
@@ -1797,7 +1797,7 @@ bool HYBRIDPluginGUI_HypothesisCreator::storeParamsToHypo( const HYBRIDHypothesi
           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 std::exception& ex) {