Salome HOME
Fix compilation errors using gcc-5.X relating to explicit stream::operator bool()
authoreap <eap@opencascade.com>
Wed, 13 Jan 2016 13:47:35 +0000 (16:47 +0300)
committereap <eap@opencascade.com>
Wed, 13 Jan 2016 13:47:35 +0000 (16:47 +0300)
+ Fix compilation warnings

61 files changed:
idl/SMESH_MeshEditor.idl
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorUtils.h
src/OBJECT/SMESH_ExtractGeometry.cxx
src/OBJECT/SMESH_ScalarBarActor.cxx
src/SMDS/SMDS_Downward.cxx
src/SMDS/SMDS_IteratorOfElements.cxx
src/SMDS/SMDS_IteratorOfElements.hxx
src/SMDS/SMDS_Mesh.cxx
src/SMDS/SMDS_MeshCell.cxx
src/SMDS/SMDS_PolyhedralVolumeOfNodes.cxx
src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx
src/SMDS/SMDS_VolumeTool.cxx
src/SMDS/chrono.cxx
src/SMESHFiltersSelection/SMESH_Type.h
src/SMESHFiltersSelection/SMESH_TypeFilter.cxx
src/SMESHGUI/SMESHGUI.h
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshOp.h
src/SMESHUtils/SMESH_File.cxx
src/SMESHUtils/SMESH_MAT2d.cxx
src/SMESHUtils/SMESH_Tree.hxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_NoteBook.cxx
src/StdMeshers/StdMeshers_Adaptive1D.cxx
src/StdMeshers/StdMeshers_Arithmetic1D.cxx
src/StdMeshers/StdMeshers_CartesianParameters3D.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_Deflection1D.cxx
src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_FaceSide.cxx
src/StdMeshers/StdMeshers_FixedPoints1D.cxx
src/StdMeshers/StdMeshers_Geometric1D.cxx
src/StdMeshers/StdMeshers_LengthFromEdges.cxx
src/StdMeshers/StdMeshers_LocalLength.cxx
src/StdMeshers/StdMeshers_MaxElementArea.cxx
src/StdMeshers/StdMeshers_MaxElementVolume.cxx
src/StdMeshers/StdMeshers_MaxLength.cxx
src/StdMeshers/StdMeshers_NumberOfLayers.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx
src/StdMeshers/StdMeshers_QuadrangleParams.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx
src/StdMeshers/StdMeshers_Reversible1D.cxx
src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx
src/StdMeshers/StdMeshers_StartEndLength.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx
src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx

index 8c63fdbdab7dc8a9eb4e57da139fe1d08ef25781..b28fb1432a386c4ad5f2fba7e6bdde23cc96fb3e 100644 (file)
@@ -773,8 +773,9 @@ module SMESH
       SEW_DIFF_NB_OF_ELEMENTS,
       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
       SEW_BAD_SIDE1_NODES,
       SEW_DIFF_NB_OF_ELEMENTS,
       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
       SEW_BAD_SIDE1_NODES,
-      SEW_BAD_SIDE2_NODES
-      };
+      SEW_BAD_SIDE2_NODES,
+      SEW_INTERNAL_ERROR
+    };
 
     Sew_Error SewFreeBorders (in long FirstNodeID1,
                               in long SecondNodeID1,
 
     Sew_Error SewFreeBorders (in long FirstNodeID1,
                               in long SecondNodeID1,
index 95d6a2ff1cb4d6bd6c7e05bedb8e6682c5d167fe..f72df42cfc4b7233cece4253123d25a031e88292 100644 (file)
@@ -435,6 +435,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
               const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
               if (aElement) {
                 switch (aElement->GetType()) {
               const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
               if (aElement) {
                 switch (aElement->GetType()) {
+
                 case SMDSAbs_Edge:
                   if (!aEdgesGroup) {
                     aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
                 case SMDSAbs_Edge:
                   if (!aEdgesGroup) {
                     aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
@@ -449,6 +450,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                   }
                   aEdgesGroup->Add(aElement);
                   break;
                   }
                   aEdgesGroup->Add(aElement);
                   break;
+
                 case SMDSAbs_Face:
                   if (!aFacesGroup) {
                     aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
                 case SMDSAbs_Face:
                   if (!aFacesGroup) {
                     aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
@@ -463,6 +465,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                   }
                   aFacesGroup->Add(aElement);
                   break;
                   }
                   aFacesGroup->Add(aElement);
                   break;
+
                 case SMDSAbs_Volume:
                   if (!aVolumeGroup) {
                     aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
                 case SMDSAbs_Volume:
                   if (!aVolumeGroup) {
                     aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
@@ -477,6 +480,8 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                   }
                   aVolumeGroup->Add(aElement);
                   break;
                   }
                   aVolumeGroup->Add(aElement);
                   break;
+
+                default:;
                 }
               } 
             }
                 }
               } 
             }
index 1c9af415d5b13b7b52435b590c1e1d92b1f71808..bdd94da6b30d6b0bc391cbab6bbbc3d01de2b01f 100644 (file)
@@ -1707,13 +1707,14 @@ void SMESH_ActorDef::SetRepresentation (int theMode)
   my0DActor->SetRepresentation(aReperesent);
   myBallActor->SetRepresentation(aReperesent);
 
   my0DActor->SetRepresentation(aReperesent);
   myBallActor->SetRepresentation(aReperesent);
 
-  switch(myControlMode){
+  switch ( myControlMode ) {
   case eLength:
   case eMultiConnection:
     aProp = aBackProp = my1DProp;
     if(myRepresentation != ePoint)
       aReperesent = SMESH_DeviceActor::eInsideframe;
     break;
   case eLength:
   case eMultiConnection:
     aProp = aBackProp = my1DProp;
     if(myRepresentation != ePoint)
       aReperesent = SMESH_DeviceActor::eInsideframe;
     break;
+  default:;
   }
 
   if(aQuadraticMode == SMESH_Actor::eLines)
   }
 
   if(aQuadraticMode == SMESH_Actor::eLines)
@@ -2253,7 +2254,7 @@ vtkPlane*
 SMESH_ActorDef::
 GetClippingPlane(vtkIdType theID)
 {
 SMESH_ActorDef::
 GetClippingPlane(vtkIdType theID)
 {
-  if(theID >= myCippingPlaneCont.size())
+  if ( theID >= (vtkIdType)myCippingPlaneCont.size() )
     return NULL;
   return myCippingPlaneCont[theID].Get();
 }
     return NULL;
   return myCippingPlaneCont[theID].Get();
 }
@@ -2487,7 +2488,7 @@ SPlot2d_Histogram* SMESH_ActorDef::UpdatePlot2Histogram() {
     bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
     fun->GetHistogram(nbIntervals, nbEvents, funValues, elemIds, range, isLogarithmic);
 
     bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
     fun->GetHistogram(nbIntervals, nbEvents, funValues, elemIds, range, isLogarithmic);
 
-    for ( int i = 0; i < std::min( nbEvents.size(), funValues.size() -1 ); i++ )
+    for ( size_t i = 0; i < std::min( nbEvents.size(), funValues.size() -1 ); i++ )
       my2dHistogram->addPoint(funValues[i] + (funValues[i+1] - funValues[i])/2.0, static_cast<double>(nbEvents[i]));
 
     if(funValues.size() >= 2)
       my2dHistogram->addPoint(funValues[i] + (funValues[i+1] - funValues[i])/2.0, static_cast<double>(nbEvents[i]));
 
     if(funValues.size() >= 2)
index 87a7c84017af611678139273700022fc95b8f12b..9d8e4f3f3eb675a096ba3a57cef25d8287d47677 100644 (file)
@@ -37,7 +37,7 @@ namespace SMESH
   enum LabelFont { 
     FntArial,    //!< arial font family
     FntCourier,  //!< courier font family
   enum LabelFont { 
     FntArial,    //!< arial font family
     FntCourier,  //!< courier font family
-    FntTimes,    //!< times font family
+    FntTimes     //!< times font family
   };
 
 SMESHOBJECT_EXPORT  
   };
 
 SMESHOBJECT_EXPORT  
index b3ff7d74bd630b151851c9b49d1328db5e190d08..d966097193c7b73f5f2a8e69c3b2bbf45cef1363 100644 (file)
@@ -60,14 +60,14 @@ SMESH_ExtractGeometry::~SMESH_ExtractGeometry()
 
 vtkIdType SMESH_ExtractGeometry::GetElemObjId(int theVtkID)
 {
 
 vtkIdType SMESH_ExtractGeometry::GetElemObjId(int theVtkID)
 {
-  if( theVtkID < 0 || theVtkID >= myElemVTK2ObjIds.size()) return -1;
+  if( theVtkID < 0 || theVtkID >= (int)myElemVTK2ObjIds.size()) return -1;
   return myElemVTK2ObjIds[theVtkID];
 }
 
 
 vtkIdType SMESH_ExtractGeometry::GetNodeObjId(int theVtkID)
 {
   return myElemVTK2ObjIds[theVtkID];
 }
 
 
 vtkIdType SMESH_ExtractGeometry::GetNodeObjId(int theVtkID)
 {
-  if ( theVtkID < 0 || theVtkID >= myNodeVTK2ObjIds.size()) return -1;
+  if ( theVtkID < 0 || theVtkID >= (int)myNodeVTK2ObjIds.size()) return -1;
   return myNodeVTK2ObjIds[theVtkID];
 }
 
   return myNodeVTK2ObjIds[theVtkID];
 }
 
index d82962cb9553341b1df2cbaac31906bdb2306316..56118211441c46d067c77361641719506ec2b32c 100644 (file)
@@ -320,7 +320,7 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
 
     // rnv begin
     // Customization of the vtkScalarBarActor to show distribution histogram.
 
     // rnv begin
     // Customization of the vtkScalarBarActor to show distribution histogram.
-    bool distrVisibility =  (numColors == this->myNbValues.size());
+    bool distrVisibility =  (numColors == (int)this->myNbValues.size());
     vtkPoints *distrPts;
     vtkCellArray *distrPolys;
     vtkUnsignedCharArray *distColors = 0;
     vtkPoints *distrPts;
     vtkCellArray *distrPolys;
     vtkUnsignedCharArray *distColors = 0;
@@ -328,12 +328,12 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     if(!distrVisibility)
       vtkDebugMacro(<<" Distribution invisible, because numColors == this->myNbValues.size()");
 
     if(!distrVisibility)
       vtkDebugMacro(<<" Distribution invisible, because numColors == this->myNbValues.size()");
 
-    if (distrVisibility && GetDistributionVisibility()) {
-      for( i=0 ;i<myNbValues.size();i++ ) {
-        if(myNbValues[i]) {
+    if ( distrVisibility && GetDistributionVisibility() ) {
+      for ( i = 0 ; i < (int)myNbValues.size(); i++ ) {
+        if ( myNbValues[i] ) {
           numPositiveVal++;
           maxValue = std::max(maxValue,myNbValues[i]);
           numPositiveVal++;
           maxValue = std::max(maxValue,myNbValues[i]);
-        } 
+        }
       }
       numDistrPts = 4*(numPositiveVal);
       distrPts = vtkPoints::New();
       }
       numDistrPts = 4*(numPositiveVal);
       distrPts = vtkPoints::New();
@@ -820,7 +820,7 @@ void SMESH_ScalarBarActor::AllocateAndSizeLabels(int *labelSize,
     int targetWidth, targetHeight;
     // rnv begin
     // Customization of the vtkScalarBarActor to show distribution histogram.
     int targetWidth, targetHeight;
     // rnv begin
     // Customization of the vtkScalarBarActor to show distribution histogram.
-    bool distrVisibility = this->MaximumNumberOfColors == this->myNbValues.size();
+    bool distrVisibility = ( this->MaximumNumberOfColors == (int) this->myNbValues.size() );
     double coef;
     if( GetDistributionVisibility() && distrVisibility )
       if(this->Orientation == VTK_ORIENT_VERTICAL)
     double coef;
     if( GetDistributionVisibility() && distrVisibility )
       if(this->Orientation == VTK_ORIENT_VERTICAL)
@@ -856,40 +856,39 @@ void SMESH_ScalarBarActor::AllocateAndSizeLabels(int *labelSize,
 }
 
 //----------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------
-void SMESH_ScalarBarActor::SizeTitle(int *titleSize, 
-                                  int *size, 
-                                  vtkViewport *viewport)
+void SMESH_ScalarBarActor::SizeTitle(int *titleSize,
+                                     int *size,
+                                     vtkViewport *viewport)
 {
   titleSize[0] = titleSize[1] = 0;
 
   if (this->Title == NULL || !strlen(this->Title))
 {
   titleSize[0] = titleSize[1] = 0;
 
   if (this->Title == NULL || !strlen(this->Title))
-    {
+  {
     return;
     return;
-    }
+  }
 
   int targetWidth, targetHeight;
 
   int targetWidth, targetHeight;
-  
+
   targetWidth = size[0];
   // rnv begin
   // Customization of the vtkScalarBarActor to show distribution histogram.
   targetWidth = size[0];
   // rnv begin
   // Customization of the vtkScalarBarActor to show distribution histogram.
-  bool distrVisibility =  this->MaximumNumberOfColors == this->myNbValues.size();
+  bool distrVisibility = ( this->MaximumNumberOfColors == (int) this->myNbValues.size() );
   double coef;
   double coef;
-  if( GetDistributionVisibility() && distrVisibility ) 
+  if ( GetDistributionVisibility() && distrVisibility )
     coef=0.18;
     coef=0.18;
-  else 
+  else
     coef=0.25;
 
   if ( this->Orientation == VTK_ORIENT_VERTICAL )
     coef=0.25;
 
   if ( this->Orientation == VTK_ORIENT_VERTICAL )
-    {
-      targetHeight = (int)(0.1*size[1]);
-    }
+  {
+    targetHeight = (int)(0.1*size[1]);
+  }
   else
   else
-    {
-      targetHeight = (int)(coef*size[1]);
-    }
+  {
+    targetHeight = (int)(coef*size[1]);
+  }
 
 
-  this->TitleMapper->SetConstrainedFontSize(
-    viewport, targetWidth, targetHeight);
+  this->TitleMapper->SetConstrainedFontSize(viewport, targetWidth, targetHeight);
 
   this->TitleMapper->GetSize(viewport, titleSize);
 }
 
   this->TitleMapper->GetSize(viewport, titleSize);
 }
index d6049c0bd198a319d4a3b15bc20e35fb38d4570b..257ab88ddc0a2380006acb9ea5ee2235bf9ce683 100644 (file)
@@ -217,13 +217,13 @@ void SMDS_Down1D::initCell(int cellId)
  */
 void SMDS_Down1D::allocate(int nbElems)
 {
  */
 void SMDS_Down1D::allocate(int nbElems)
 {
-  if (nbElems >= _vtkCellIds.size())
-    {
-      _vtkCellIds.resize(nbElems + SMDS_Mesh::chunkSize, -1);
-      _cellIds.resize(_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
-      _upCellIdsVector.resize(nbElems + SMDS_Mesh::chunkSize);
-      _upCellTypesVector.resize(nbElems + SMDS_Mesh::chunkSize);
-    }
+  if (nbElems >= (int)_vtkCellIds.size())
+  {
+    _vtkCellIds.resize(nbElems + SMDS_Mesh::chunkSize, -1);
+    _cellIds.resize(_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
+    _upCellIdsVector.resize(nbElems + SMDS_Mesh::chunkSize);
+    _upCellTypesVector.resize(nbElems + SMDS_Mesh::chunkSize);
+  }
 }
 
 void SMDS_Down1D::compactStorage()
 }
 
 void SMDS_Down1D::compactStorage()
@@ -239,15 +239,15 @@ void SMDS_Down1D::compactStorage()
   _upCellIndex.resize(_maxId + 1, -1); // id and types of rank i correspond to [ _upCellIndex[i], _upCellIndex[i+1] [
   int current = 0;
   for (int i = 0; i < _maxId; i++)
   _upCellIndex.resize(_maxId + 1, -1); // id and types of rank i correspond to [ _upCellIndex[i], _upCellIndex[i+1] [
   int current = 0;
   for (int i = 0; i < _maxId; i++)
+  {
+    _upCellIndex[i] = current;
+    for (size_t j = 0; j < _upCellIdsVector[i].size(); j++)
     {
     {
-      _upCellIndex[i] = current;
-      for (int j = 0; j < _upCellIdsVector[i].size(); j++)
-        {
-          _upCellIds[current] = _upCellIdsVector[i][j];
-          _upCellTypes[current] = _upCellTypesVector[i][j];
-          current++;
-        }
+      _upCellIds[current] = _upCellIdsVector[i][j];
+      _upCellTypes[current] = _upCellTypesVector[i][j];
+      current++;
     }
     }
+  }
   _upCellIndex[_maxId] = current;
 
   _upCellIdsVector.clear();
   _upCellIndex[_maxId] = current;
 
   _upCellIdsVector.clear();
@@ -674,14 +674,14 @@ bool SMDS_Down2D::isInFace(int cellId, int *pts, int npts)
  */
 void SMDS_Down2D::allocate(int nbElems)
 {
  */
 void SMDS_Down2D::allocate(int nbElems)
 {
-  if (nbElems >= _vtkCellIds.size())
-    {
-      _cellIds.resize(_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
-      _vtkCellIds.resize(nbElems + SMDS_Mesh::chunkSize, -1);
-      _upCellIds.resize(2 * (nbElems + SMDS_Mesh::chunkSize), -1);
-      _upCellTypes.resize(2 * (nbElems + SMDS_Mesh::chunkSize), -1);
-      _tempNodes.resize(_nbNodes * (nbElems + SMDS_Mesh::chunkSize), -1);
-    }
+  if (nbElems >= (int)_vtkCellIds.size())
+  {
+    _cellIds.resize    (_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
+    _vtkCellIds.resize (nbElems + SMDS_Mesh::chunkSize, -1);
+    _upCellIds.resize  (2 * (nbElems + SMDS_Mesh::chunkSize), -1);
+    _upCellTypes.resize(2 * (nbElems + SMDS_Mesh::chunkSize), -1);
+    _tempNodes.resize  (_nbNodes * (nbElems + SMDS_Mesh::chunkSize), -1);
+  }
 }
 
 void SMDS_Down2D::compactStorage()
 }
 
 void SMDS_Down2D::compactStorage()
@@ -764,11 +764,11 @@ SMDS_Down3D::~SMDS_Down3D()
 
 void SMDS_Down3D::allocate(int nbElems)
 {
 
 void SMDS_Down3D::allocate(int nbElems)
 {
-  if (nbElems >= _vtkCellIds.size())
-    {
-      _cellIds.resize(_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
-      _vtkCellIds.resize(nbElems + SMDS_Mesh::chunkSize, -1);
-    }
+  if (nbElems >= (int)_vtkCellIds.size())
+  {
+    _cellIds.resize(_nbDownCells * (nbElems + SMDS_Mesh::chunkSize), -1);
+    _vtkCellIds.resize(nbElems + SMDS_Mesh::chunkSize, -1);
+  }
 }
 
 void SMDS_Down3D::compactStorage()
 }
 
 void SMDS_Down3D::compactStorage()
@@ -1121,7 +1121,7 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1131,19 +1131,19 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
 
   set<int> tofind;
   int ids[12] = { 0, 1, 2,  0, 3, 1,  2, 3, 0,   1, 3, 2 };
 
   set<int> tofind;
   int ids[12] = { 0, 1, 2,  0, 3, 1,  2, 3, 0,   1, 3, 2 };
-//int ids[12] = { 2, 1, 0,  1, 3, 0,  0, 3, 2,   2, 3, 1 };
+  //int ids[12] = { 2, 1, 0,  1, 3, 0,  0, 3, 2,   2, 3, 1 };
   for (int k = 0; k < 4; k++)
   for (int k = 0; k < 4; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 3; i++)
+      tofind.insert(nodes[ids[3 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 3; i++)
       for (int i = 0; i < 3; i++)
-        tofind.insert(nodes[ids[3 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 3; i++)
-            orderedNodes[i] = nodes[ids[3 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[3 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1229,7 +1229,7 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1239,19 +1239,19 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
 
   set<int> tofind;
   int ids[24] = { 0, 1, 2, 4, 5, 6,  0, 3, 1, 7, 8, 4,  2, 3, 0, 9, 7, 6,  1, 3, 2, 8, 9, 5 };
 
   set<int> tofind;
   int ids[24] = { 0, 1, 2, 4, 5, 6,  0, 3, 1, 7, 8, 4,  2, 3, 0, 9, 7, 6,  1, 3, 2, 8, 9, 5 };
-//int ids[24] = { 2, 1, 0, 5, 4, 6,  1, 3, 0, 8, 7, 4,  0, 3, 2, 7, 9, 6,  2, 3, 1, 9, 8, 5 };
+  //int ids[24] = { 2, 1, 0, 5, 4, 6,  1, 3, 0, 8, 7, 4,  0, 3, 2, 7, 9, 6,  2, 3, 1, 9, 8, 5 };
   for (int k = 0; k < 4; k++)
   for (int k = 0; k < 4; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 6; i++)
+      tofind.insert(nodes[ids[6 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 6; i++)
       for (int i = 0; i < 6; i++)
-        tofind.insert(nodes[ids[6 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 6; i++)
-            orderedNodes[i] = nodes[ids[6 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[6 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1352,7 +1352,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1368,24 +1368,24 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
   for (int i = 0; i < 4; i++)
     tofind.insert(nodes[ids[i]]);
   if (setNodes == tofind)
   for (int i = 0; i < 4; i++)
     tofind.insert(nodes[ids[i]]);
   if (setNodes == tofind)
-    {
-      for (int i = 0; i < 4; i++)
-        orderedNodes[i] = nodes[ids[i]];
-      return;
-    }
+  {
+    for (int i = 0; i < 4; i++)
+      orderedNodes[i] = nodes[ids[i]];
+    return;
+  }
   // Triangular faces
   for (int k = 0; k < 4; k++)
   // Triangular faces
   for (int k = 0; k < 4; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 3; i++)
+      tofind.insert(nodes[ids[4 + 3 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 3; i++)
       for (int i = 0; i < 3; i++)
-        tofind.insert(nodes[ids[4 + 3 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 3; i++)
-            orderedNodes[i] = nodes[ids[4 + 3 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[4 + 3 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1492,10 +1492,10 @@ SMDS_DownQuadPyramid::~SMDS_DownQuadPyramid()
 
 void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
 
 void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
-//   MESSAGE("SMDS_DownQuadPyramid::getOrderedNodesOfFace cellId = " << cellId);
+  //   MESSAGE("SMDS_DownQuadPyramid::getOrderedNodesOfFace cellId = " << cellId);
   set<int> setNodes;
   setNodes.clear();
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++)
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1512,24 +1512,24 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
   for (int i = 0; i < 8; i++)
     tofind.insert(nodes[ids[i]]);
   if (setNodes == tofind)
   for (int i = 0; i < 8; i++)
     tofind.insert(nodes[ids[i]]);
   if (setNodes == tofind)
-    {
-      for (int i = 0; i < 8; i++)
-        orderedNodes[i] = nodes[ids[i]];
-      return;
-    }
+  {
+    for (int i = 0; i < 8; i++)
+      orderedNodes[i] = nodes[ids[i]];
+    return;
+  }
   // Triangular faces
   for (int k = 0; k < 4; k++)
   // Triangular faces
   for (int k = 0; k < 4; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 6; i++)
+      tofind.insert(nodes[ids[8 + 6 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 6; i++)
       for (int i = 0; i < 6; i++)
-        tofind.insert(nodes[ids[8 + 6 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 6; i++)
-            orderedNodes[i] = nodes[ids[8 + 6 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[8 + 6 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1655,7 +1655,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++)
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1664,35 +1664,35 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
-//int ids[18] = { 0, 2, 1,  3, 4, 5,   0, 1, 4, 3,   1, 2, 5, 4,   2, 0, 3, 5 };
+  //int ids[18] = { 0, 2, 1,  3, 4, 5,   0, 1, 4, 3,   1, 2, 5, 4,   2, 0, 3, 5 };
   int ids[18] = { 0, 1, 2,  3, 5, 4,   0, 3, 4, 1,   1, 4, 5, 2,   2, 5, 3, 0 };
 
   // Triangular faces
   for (int k = 0; k < 2; k++)
   int ids[18] = { 0, 1, 2,  3, 5, 4,   0, 3, 4, 1,   1, 4, 5, 2,   2, 5, 3, 0 };
 
   // Triangular faces
   for (int k = 0; k < 2; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 3; i++)
+      tofind.insert(nodes[ids[3 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 3; i++)
       for (int i = 0; i < 3; i++)
-        tofind.insert(nodes[ids[3 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 3; i++)
-            orderedNodes[i] = nodes[ids[3 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[3 * k + i]];
+      return;
     }
     }
+  }
   // Quadrangular faces
   for (int k = 0; k < 3; k++)
   // Quadrangular faces
   for (int k = 0; k < 3; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 4; i++)
+      tofind.insert(nodes[ids[6 + 4 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 4; i++)
       for (int i = 0; i < 4; i++)
-        tofind.insert(nodes[ids[6 + 4 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 4; i++)
-            orderedNodes[i] = nodes[ids[6 + 4 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[6 + 4 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1704,7 +1704,7 @@ void SMDS_DownPenta::addDownCell(int cellId, int lowCellId, unsigned char aType)
   int *faces = &_cellIds[_nbDownCells * cellId];
   if (aType == VTK_QUAD)
     for (int i = 0; i < 3; i++)
   int *faces = &_cellIds[_nbDownCells * cellId];
   if (aType == VTK_QUAD)
     for (int i = 0; i < 3; i++)
-      {
+    {
         if (faces[i] < 0)
           {
             faces[i] = lowCellId;
         if (faces[i] < 0)
           {
             faces[i] = lowCellId;
@@ -1805,7 +1805,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1814,36 +1814,36 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
-//int ids[18] = { 0, 2, 1,  3, 4, 5,   0, 1, 4, 3,   1, 2, 5, 4,   2, 0, 3, 5 };
+  //int ids[18] = { 0, 2, 1,  3, 4, 5,   0, 1, 4, 3,   1, 2, 5, 4,   2, 0, 3, 5 };
   int ids[36] = { 0, 1, 2, 6, 7, 8,  3, 5, 4, 11, 10, 9,
                   0, 3, 4, 1, 12, 9, 13, 6,   1, 4, 5, 2, 13, 10, 14, 7,   2, 5, 3, 0, 14, 11, 12, 8 };
 
   // Triangular faces
   for (int k = 0; k < 2; k++)
   int ids[36] = { 0, 1, 2, 6, 7, 8,  3, 5, 4, 11, 10, 9,
                   0, 3, 4, 1, 12, 9, 13, 6,   1, 4, 5, 2, 13, 10, 14, 7,   2, 5, 3, 0, 14, 11, 12, 8 };
 
   // Triangular faces
   for (int k = 0; k < 2; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 6; i++)
+      tofind.insert(nodes[ids[6 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 6; i++)
       for (int i = 0; i < 6; i++)
-        tofind.insert(nodes[ids[6 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 6; i++)
-            orderedNodes[i] = nodes[ids[6 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[6 * k + i]];
+      return;
     }
     }
+  }
   // Quadrangular faces
   for (int k = 0; k < 3; k++)
   // Quadrangular faces
   for (int k = 0; k < 3; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 8; i++)
+      tofind.insert(nodes[ids[12 + 8 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 8; i++)
       for (int i = 0; i < 8; i++)
-        tofind.insert(nodes[ids[12 + 8 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 8; i++)
-            orderedNodes[i] = nodes[ids[12 + 8 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[12 + 8 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -1976,7 +1976,7 @@ void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& or
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -1985,20 +1985,20 @@ void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& or
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
 
   set<int> tofind;
-//int ids[24] = { 0, 1, 2, 3,  7, 6, 5, 4,  4, 0, 3, 7,  5, 1, 0, 4,  6, 2, 1, 5,  7, 3, 2, 6};
+  //int ids[24] = { 0, 1, 2, 3,  7, 6, 5, 4,  4, 0, 3, 7,  5, 1, 0, 4,  6, 2, 1, 5,  7, 3, 2, 6};
   int ids[24] = { 3, 2, 1, 0,  4, 5, 6, 7,  7, 3, 0, 4,  4, 0, 1, 5,  5, 1, 2, 6,  6, 2, 3, 7};
   for (int k = 0; k < 6; k++) // loop on the 6 faces
   int ids[24] = { 3, 2, 1, 0,  4, 5, 6, 7,  7, 3, 0, 4,  4, 0, 1, 5,  5, 1, 2, 6,  6, 2, 3, 7};
   for (int k = 0; k < 6; k++) // loop on the 6 faces
+  {
+    tofind.clear();
+    for (int i = 0; i < 4; i++)
+      tofind.insert(nodes[ids[4 * k + i]]); // node ids of the face i
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 4; i++)
       for (int i = 0; i < 4; i++)
-        tofind.insert(nodes[ids[4 * k + i]]); // node ids of the face i
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 4; i++)
-            orderedNodes[i] = nodes[ids[4 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[4 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
@@ -2107,7 +2107,7 @@ void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>
 {
   set<int> setNodes;
   setNodes.clear();
 {
   set<int> setNodes;
   setNodes.clear();
-  for (int i = 0; i < orderedNodes.size(); i++)
+  for ( size_t i = 0; i < orderedNodes.size(); i++ )
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
     setNodes.insert(orderedNodes[i]);
   //MESSAGE("cellId = " << cellId);
 
@@ -2120,17 +2120,17 @@ void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>
   int ids[48] = { 3, 2, 1, 0,10, 9, 8,11,   4, 5, 6, 7,12,13,14,15,   7, 3, 0, 4,19,11,16,15,
                   4, 0, 1, 5,16, 8,17,12,   5, 1, 2, 6,17, 9,18,13,   6, 2, 3, 7,18,10,19,14};
   for (int k = 0; k < 6; k++)
   int ids[48] = { 3, 2, 1, 0,10, 9, 8,11,   4, 5, 6, 7,12,13,14,15,   7, 3, 0, 4,19,11,16,15,
                   4, 0, 1, 5,16, 8,17,12,   5, 1, 2, 6,17, 9,18,13,   6, 2, 3, 7,18,10,19,14};
   for (int k = 0; k < 6; k++)
+  {
+    tofind.clear();
+    for (int i = 0; i < 8; i++)
+      tofind.insert(nodes[ids[8 * k + i]]);
+    if (setNodes == tofind)
     {
     {
-      tofind.clear();
       for (int i = 0; i < 8; i++)
       for (int i = 0; i < 8; i++)
-        tofind.insert(nodes[ids[8 * k + i]]);
-      if (setNodes == tofind)
-        {
-          for (int i = 0; i < 8; i++)
-            orderedNodes[i] = nodes[ids[8 * k + i]];
-          return;
-        }
+        orderedNodes[i] = nodes[ids[8 * k + i]];
+      return;
     }
     }
+  }
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
   MESSAGE("=== Problem volume " << _vtkCellIds[cellId] << " " << _grid->_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
   MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
   MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
index 3719c6b56ee174d5c68f51807c15d602e4ff48fe..e775b5bdaecdeebd3d1e8918d4646608ef3edd14 100644 (file)
@@ -54,24 +54,24 @@ const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
 /// Create an iterator which look for elements of type type which are linked 
 /// to the element element. it is the iterator to get connectivity of element
 //////////////////////////////////////////////////////////////////////////////
 /// Create an iterator which look for elements of type type which are linked 
 /// to the element element. it is the iterator to get connectivity of element
 //////////////////////////////////////////////////////////////////////////////
-SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement * element,
-                                                 SMDSAbs_ElementType type,
+SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement *    element,
+                                                 SMDSAbs_ElementType         type,
                                                  const SMDS_ElemIteratorPtr& it)
                                                  const SMDS_ElemIteratorPtr& it)
-     : t1Iterator(it),
-       t2Iterator(SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL)),
-       myType(type), myElement(element),
-       myProxyElement(NULL)
+  : t1Iterator(it),
+    t2Iterator(SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL)),
+    myType(type), myElement(element),
+    myProxyElement(NULL)
 {
 {
-        while(subMore())
-                alreadyReturnedElements.insert(subNext());
-        itAlreadyReturned= alreadyReturnedElements.begin();
-        switch(myElement->GetType())
-        {
-        case SMDSAbs_Node: 
-        case SMDSAbs_Edge: myReverseIteration=true; break;
-        case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
-        default: myReverseIteration=false;
-        }       
+  while(subMore())
+    alreadyReturnedElements.insert(subNext());
+  itAlreadyReturned= alreadyReturnedElements.begin();
+  switch(myElement->GetType())
+  {
+  case SMDSAbs_Node:
+  case SMDSAbs_Edge: myReverseIteration=true; break;
+  case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
+  default: myReverseIteration=false;
+  }
 }
 
 bool SMDS_IteratorOfElements::more()
 }
 
 bool SMDS_IteratorOfElements::more()
index e0756198c9d2512d6635a3d3d786246cf30bf2ca..2b720b0cc2ffb67b6f9a0c06ac2e1765ebb21ac3 100644 (file)
@@ -43,11 +43,11 @@ class SMDS_EXPORT SMDS_IteratorOfElements:public SMDS_ElemIterator
         const SMDS_MeshElement * next();
 
   private:
         const SMDS_MeshElement * next();
 
   private:
-        SMDS_ElemIteratorPtr t2Iterator;
         SMDS_ElemIteratorPtr t1Iterator;
         SMDS_ElemIteratorPtr t1Iterator;
+        SMDS_ElemIteratorPtr t2Iterator;
         SMDSAbs_ElementType myType;     
         SMDSAbs_ElementType myType;     
-        const SMDS_MeshElement * myProxyElement;
         const SMDS_MeshElement * myElement;             
         const SMDS_MeshElement * myElement;             
+        const SMDS_MeshElement * myProxyElement;
         bool myReverseIteration;
 
         std::set<const SMDS_MeshElement*> alreadyReturnedElements;
         bool myReverseIteration;
 
         std::set<const SMDS_MeshElement*> alreadyReturnedElements;
index c4cadf10f7161484d7faab35556867fdd00f873d..f378874828aa7a91101a0d9e6742be1915878d14 100644 (file)
@@ -3149,6 +3149,7 @@ void SMDS_Mesh::addChildrenWithNodes(set<const SMDS_MeshElement*>& setOfChildren
     MESSAGE("Internal Error: This should not happen");
     break;
   case SMDSAbs_0DElement:
     MESSAGE("Internal Error: This should not happen");
     break;
   case SMDSAbs_0DElement:
+  case SMDSAbs_Ball:
   {
   }
   break;
   {
   }
   break;
@@ -3199,6 +3200,7 @@ void SMDS_Mesh::addChildrenWithNodes(set<const SMDS_MeshElement*>& setOfChildren
         addChildrenWithNodes(setOfChildren, ite->next(), nodes);
     }
   }
         addChildrenWithNodes(setOfChildren, ite->next(), nodes);
     }
   }
+  case SMDSAbs_NbElementTypes:
   case SMDSAbs_All: break;
   }
 }
   case SMDSAbs_All: break;
   }
 }
index e629a2f5b7a02a7e18fb5f5ba9c5889044ed34c0..8b7b2f63c5c3aede2bc935ca8696e93301065058 100644 (file)
@@ -278,7 +278,7 @@ const std::vector<int>& SMDS_MeshCell::reverseSmdsOrder(SMDSAbs_EntityType smdsT
       reverseInterlaces[ smdsType ][pos++] = 0;
       for ( int i = nbNodes / 2 - 1; i > 0 ; --i ) // 3,2,1
         reverseInterlaces[ smdsType ][pos++] = i;
       reverseInterlaces[ smdsType ][pos++] = 0;
       for ( int i = nbNodes / 2 - 1; i > 0 ; --i ) // 3,2,1
         reverseInterlaces[ smdsType ][pos++] = i;
-      for ( int i = nbNodes - 1; i >= nbNodes / 2; --i ) // 7,6,5,4
+      for ( int i = nbNodes - 1, nb = nbNodes / 2; i >= nb; --i ) // 7,6,5,4
         reverseInterlaces[ smdsType ][pos++] = i;
     }
   }
         reverseInterlaces[ smdsType ][pos++] = i;
     }
   }
index 2dfa337db3a4b16ee7359143bf73f5bc64f5768b..22cab1ab8538a63df75d838b844e5604cea812d2 100644 (file)
@@ -101,7 +101,7 @@ int SMDS_PolyhedralVolumeOfNodes::NbEdges() const
 {
   int nbEdges = 0;
 
 {
   int nbEdges = 0;
 
-  for (int ifa = 0; ifa < myQuantities.size(); ifa++) {
+  for ( size_t ifa = 0; ifa < myQuantities.size(); ifa++) {
     nbEdges += myQuantities[ifa];
   }
   nbEdges /= 2;
     nbEdges += myQuantities[ifa];
   }
   nbEdges /= 2;
@@ -124,7 +124,7 @@ int SMDS_PolyhedralVolumeOfNodes::NbFaces() const
 //=======================================================================
 int SMDS_PolyhedralVolumeOfNodes::NbFaceNodes (const int face_ind) const
 {
 //=======================================================================
 int SMDS_PolyhedralVolumeOfNodes::NbFaceNodes (const int face_ind) const
 {
-  if (face_ind < 1 || myQuantities.size() < face_ind)
+  if (face_ind < 1 || (int)myQuantities.size() < face_ind)
     return 0;
   return myQuantities[face_ind - 1];
 }
     return 0;
   return myQuantities[face_ind - 1];
 }
@@ -201,7 +201,7 @@ struct _MyIterator:public SMDS_NodeVectorElemIterator
 class _MySubIterator : public SMDS_ElemIterator
 {
   vector< const SMDS_MeshElement* > myElems;
 class _MySubIterator : public SMDS_ElemIterator
 {
   vector< const SMDS_MeshElement* > myElems;
-  int myIndex;
+  size_t                            myIndex;
 public:
   _MySubIterator(const SMDS_MeshVolume* vol, SMDSAbs_ElementType type):myIndex(0) {
     SMDS_VolumeTool vTool(vol);
 public:
   _MySubIterator(const SMDS_MeshVolume* vol, SMDSAbs_ElementType type):myIndex(0) {
     SMDS_VolumeTool vTool(vol);
index 2a356d5810647bb4e02d3b03695d1af6b85bfac7..0ab7e8c84e0592a5a0c288b771ad27c23a41bbd0 100644 (file)
@@ -215,7 +215,7 @@ bool SMDS_QuadraticVolumeOfNodes::IsMediumNode(const SMDS_MeshNode* node) const
   case 15: nbCorners = 6; break;
   default: nbCorners = 8;
   }
   case 15: nbCorners = 6; break;
   default: nbCorners = 8;
   }
-  for ( int i = nbCorners; i<myNodes.size(); i++) {
+  for ( size_t i = nbCorners; i<myNodes.size(); i++) {
     if(myNodes[i]==node) return true;
   }
   return false;
     if(myNodes[i]==node) return true;
   }
   return false;
@@ -318,7 +318,7 @@ public:
 class _MySubIterator : public SMDS_ElemIterator
 {
   vector< const SMDS_MeshElement* > myElems;
 class _MySubIterator : public SMDS_ElemIterator
 {
   vector< const SMDS_MeshElement* > myElems;
-  int myIndex;
+  size_t                            myIndex;
 public:
   _MySubIterator(const SMDS_MeshVolume* vol, SMDSAbs_ElementType type):myIndex(0) {
     SMDS_VolumeTool vTool(vol);
 public:
   _MySubIterator(const SMDS_MeshVolume* vol, SMDSAbs_ElementType type):myIndex(0) {
     SMDS_VolumeTool vTool(vol);
index c0c506d9cc13ba79e607cbf392d6f612bd1cd4e2..06755badfe00214f35f00414d12a7fe3ee49537e 100644 (file)
@@ -843,7 +843,7 @@ bool SMDS_VolumeTool::GetBaryCenter(double & X, double & Y, double & Z) const
   if ( !myVolume )
     return false;
 
   if ( !myVolume )
     return false;
 
-  for ( int i = 0; i < myVolumeNodes.size(); i++ ) {
+  for ( size_t i = 0; i < myVolumeNodes.size(); i++ ) {
     X += myVolumeNodes[ i ]->X();
     Y += myVolumeNodes[ i ]->Y();
     Z += myVolumeNodes[ i ]->Z();
     X += myVolumeNodes[ i ]->X();
     Y += myVolumeNodes[ i ]->Y();
     Z += myVolumeNodes[ i ]->Z();
@@ -1390,7 +1390,7 @@ bool SMDS_VolumeTool::IsLinked (const SMDS_MeshNode* theNode1,
 
   // find nodes indices
   int i1 = -1, i2 = -1, nbFound = 0;
 
   // find nodes indices
   int i1 = -1, i2 = -1, nbFound = 0;
-  for ( int i = 0; i < myVolumeNodes.size() && nbFound < 2; i++ )
+  for ( size_t i = 0; i < myVolumeNodes.size() && nbFound < 2; i++ )
   {
     if ( myVolumeNodes[ i ] == theNode1 )
       i1 = i, ++nbFound;
   {
     if ( myVolumeNodes[ i ] == theNode1 )
       i1 = i, ++nbFound;
@@ -1418,7 +1418,7 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
   int minInd = min( theNode1Index, theNode2Index );
   int maxInd = max( theNode1Index, theNode2Index );
 
   int minInd = min( theNode1Index, theNode2Index );
   int maxInd = max( theNode1Index, theNode2Index );
 
-  if ( minInd < 0 || maxInd > myVolumeNodes.size() - 1 || maxInd == minInd )
+  if ( minInd < 0 || maxInd > (int)myVolumeNodes.size() - 1 || maxInd == minInd )
     return false;
 
   VolumeType type = GetVolumeType();
     return false;
 
   VolumeType type = GetVolumeType();
@@ -1535,7 +1535,7 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
 int SMDS_VolumeTool::GetNodeIndex(const SMDS_MeshNode* theNode) const
 {
   if ( myVolume ) {
 int SMDS_VolumeTool::GetNodeIndex(const SMDS_MeshNode* theNode) const
 {
   if ( myVolume ) {
-    for ( int i = 0; i < myVolumeNodes.size(); i++ ) {
+    for ( size_t i = 0; i < myVolumeNodes.size(); i++ ) {
       if ( myVolumeNodes[ i ] == theNode )
         return i;
     }
       if ( myVolumeNodes[ i ] == theNode )
         return i;
     }
@@ -1596,8 +1596,8 @@ int SMDS_VolumeTool::GetAllExistingEdges(vector<const SMDS_MeshElement*> & edges
 {
   edges.clear();
   edges.reserve( myVolumeNodes.size() * 2 );
 {
   edges.clear();
   edges.reserve( myVolumeNodes.size() * 2 );
-  for ( int i = 0; i < myVolumeNodes.size()-1; ++i ) {
-    for ( int j = i + 1; j < myVolumeNodes.size(); ++j ) {
+  for ( size_t i = 0; i < myVolumeNodes.size()-1; ++i ) {
+    for ( size_t j = i + 1; j < myVolumeNodes.size(); ++j ) {
       if ( IsLinked( i, j )) {
         const SMDS_MeshElement* edge =
           SMDS_Mesh::FindEdge( myVolumeNodes[i], myVolumeNodes[j] );
       if ( IsLinked( i, j )) {
         const SMDS_MeshElement* edge =
           SMDS_Mesh::FindEdge( myVolumeNodes[i], myVolumeNodes[j] );
index caa6031f404cba316ac1d7653271020a00cb00a4..e09007076d86273ead8f3d88d8685b3bbb14200f 100644 (file)
@@ -60,7 +60,7 @@ void counters::stats()
 }
 
 chrono::chrono(int i) :
 }
 
 chrono::chrono(int i) :
-  _ctr(i), _run(true)
+  _run(true), _ctr(i)
 {
   //MESSAGE("chrono::chrono " << _ctr << " " << _run);
   _start = clock();
 {
   //MESSAGE("chrono::chrono " << _ctr << " " << _run);
   _start = clock();
index 9398fe6499b4cf733f348e2475bf4c772e432975..94e1b6fb4b9bda88878adab1a185c3d20d2cda05 100644 (file)
@@ -39,7 +39,7 @@
  #define SMESHFILTERSSELECTION_EXPORT
 #endif
 
  #define SMESHFILTERSSELECTION_EXPORT
 #endif
 
-namespace SMESH{
+namespace SMESH {
   enum MeshObjectType {
     HYPOTHESIS,
     ALGORITHM,
   enum MeshObjectType {
     HYPOTHESIS,
     ALGORITHM,
@@ -64,5 +64,5 @@ namespace SMESH{
     IDSOURCE_FACE,
     IDSOURCE_VOLUME
   };
     IDSOURCE_FACE,
     IDSOURCE_VOLUME
   };
-};
+}
 #endif
 #endif
index 5f12c7faa9a794c7b6757d6d6193cd8136be1b1d..fc0c43bdd0f5bed7f427e1a0f3bbd2573e389960 100644 (file)
@@ -264,6 +264,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
           Ok = isIDSourceOfType( obj, SMESH::VOLUME );
           break;
         }
           Ok = isIDSourceOfType( obj, SMESH::VOLUME );
           break;
         }
+    default:;
     }
   }
   return Ok;
     }
   }
   return Ok;
index 12d43fc6d37e9713e2efc733552477ea5f0c122f..a429e8818fc76fc28400b8a6adfa82d1926dee14 100644 (file)
@@ -84,7 +84,7 @@ typedef std::map<SUIT_ViewManager*, SMESHGUI_ClippingPlaneInfoList> SMESHGUI_Cli
 //=================================================================================
 class SMESHGUI_EXPORT SMESHGUI : public SalomeApp_Module
 {
 //=================================================================================
 class SMESHGUI_EXPORT SMESHGUI : public SalomeApp_Module
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public :
   SMESHGUI();
 
 public :
   SMESHGUI();
index 5cfddb9ce8850d6010519951a9d9cb24e90ef2fb..deacb22f01de69ddc4f234d1de56f1ef1564f02a 100644 (file)
@@ -338,8 +338,8 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
-    myGeomType( theType ),
-    myBusy( false )
+    myBusy( false ),
+    myGeomType( theType )
 {
   setModal( false );
   setAttribute( Qt::WA_DeleteOnClose, true );
 {
   setModal( false );
   setAttribute( Qt::WA_DeleteOnClose, true );
@@ -599,6 +599,7 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
     myNbCenterNodes = 1;
     myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_hexahedrons
     break;
     myNbCenterNodes = 1;
     myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_hexahedrons
     break;
+  default:;
   }
 
   myMidFaceLabel       ->setVisible( myNbMidFaceNodes );
   }
 
   myMidFaceLabel       ->setVisible( myNbMidFaceNodes );
@@ -724,6 +725,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
       anIds.push_back( aListId[ 0 ].toInt() );
     }
     break;
       anIds.push_back( aListId[ 0 ].toInt() );
     }
     break;
+  default:;
   }
   if ( myReverseCB->isChecked())
     ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
   }
   if ( myReverseCB->isChecked())
     ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
@@ -849,6 +851,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
     case SMESH::VOLUME:
       myActor->SetRepresentation(SMESH_Actor::eSurface);
       myActor->SetEntityMode( aMode |= SMESH_Actor::eVolumes ); break;
     case SMESH::VOLUME:
       myActor->SetRepresentation(SMESH_Actor::eSurface);
       myActor->SetEntityMode( aMode |= SMESH_Actor::eVolumes ); break;
+    default:;
     }
   }
 
     }
   }
 
@@ -1068,6 +1071,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
     case SMDSEntity_Quad_Hexa:
     case SMDSEntity_TriQuad_Hexa:
       anElementType = SMESH::VOLUME; break;
     case SMDSEntity_Quad_Hexa:
     case SMDSEntity_TriQuad_Hexa:
       anElementType = SMESH::VOLUME; break;
+    default:;
     }
     myGroups.clear();
     ComboBox_GroupName->clear();
     }
     myGroups.clear();
     ComboBox_GroupName->clear();
@@ -1309,7 +1313,7 @@ bool SMESHGUI_AddQuadraticElementDlg::IsValid()
     okIDs.insert( anID );
   }
 
     okIDs.insert( anID );
   }
 
-  return okIDs.size() == myTable->rowCount() + myNbMidFaceNodes + myNbCenterNodes;
+  return (int) okIDs.size() == myTable->rowCount() + myNbMidFaceNodes + myNbCenterNodes;
 }
 
 //=================================================================================
 }
 
 //=================================================================================
@@ -1406,6 +1410,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
       aFirstColIds = FirstHexahedronIds;
       aLastColIds  = LastHexahedronIds;
       break;
       aFirstColIds = FirstHexahedronIds;
       aLastColIds  = LastHexahedronIds;
       break;
+    default:;
     }
 
     // fill the First and the Last columns
     }
 
     // fill the First and the Last columns
index 161d2183fd7191cc11d06abcb65b5f9c31714754..b3e117556084ef3773a48097c1cdfe769918f0e2 100644 (file)
@@ -56,7 +56,7 @@ class SUIT_SelectionFilter;
 //=================================================================================
 class SMESHGUI_EXPORT SMESHGUI_BuildCompoundDlg : public QDialog
 {
 //=================================================================================
 class SMESHGUI_EXPORT SMESHGUI_BuildCompoundDlg : public QDialog
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
 
 
 public:
 
index 1d68b74fa04a8a9f980913c3307a423ac37cc33b..d38e638ca77d648f381ad2ce46451b5c9c022164 100644 (file)
@@ -601,12 +601,12 @@ SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg()
   if (myViewWindow)
     SMESH::RenderViewWindow(myViewWindow);
 
   if (myViewWindow)
     SMESH::RenderViewWindow(myViewWindow);
 
-  for( int i=0; i< myPlanes.size(); i++ ) {
+  for ( size_t i = 0; i < myPlanes.size(); i++ ) {
     SMESH::TPlaneData aPlaneData = myPlanes[i];
     aPlaneData.Plane->Delete();
   }
 
     SMESH::TPlaneData aPlaneData = myPlanes[i];
     aPlaneData.Plane->Delete();
   }
 
-  if (myPreviewWidget) {
+  if ( myPreviewWidget ) {
     myPreviewWidget->Off();
     myPreviewWidget->Delete();
   }
     myPreviewWidget->Off();
     myPreviewWidget->Delete();
   }
index a71b425d407fdd28f5e16f52de0ac45022aada07..001416791ad056a09988b62c22399a735937a12f 100644 (file)
@@ -271,7 +271,7 @@ namespace SMESH
     GEOM_Actor* getActor(const TopoDS_Shape& shape)
     {
       int index = myIndexToShape.FindIndex( shape ) - 1;
     GEOM_Actor* getActor(const TopoDS_Shape& shape)
     {
       int index = myIndexToShape.FindIndex( shape ) - 1;
-      if ( index < 0 || index >= myActors.size() )
+      if ( index < 0 || index >= (int) myActors.size() )
         return 0;
       GEOM_Actor* & actor = myActors[ index ];
       if ( !actor ) {
         return 0;
       GEOM_Actor* & actor = myActors[ index ];
       if ( !actor ) {
@@ -887,7 +887,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
 #endif
       aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
       // check if there are memory problems
 #endif
       aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
       // check if there are memory problems
-      for ( int i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
+      for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
         memoryLack = ( aCompErrors[ i ].code == SMESH::COMPERR_MEMORY_PB );
     }
     catch(const SALOME::SALOME_Exception & S_ex) {
         memoryLack = ( aCompErrors[ i ].code == SMESH::COMPERR_MEMORY_PB );
     }
     catch(const SALOME::SALOME_Exception & S_ex) {
@@ -922,7 +922,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
         aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aMeshObj, aMeshSObj) );
         SMESH::submesh_array_var aSubMeshes = myMesh->GetSubMeshes();
         // put SubMeshes into list
         aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aMeshObj, aMeshSObj) );
         SMESH::submesh_array_var aSubMeshes = myMesh->GetSubMeshes();
         // put SubMeshes into list
-        for ( int i = 0; i < aSubMeshes->length(); i++ ) {
+        for ( CORBA::ULong i = 0; i < aSubMeshes->length(); i++ ) {
           SMESH::SMESH_subMesh_var sm = aSubMeshes[i];
           if ( CORBA::is_nil( sm ) ) continue;
           _PTR(SObject) smSObj = SMESH::ObjectToSObject( sm );
           SMESH::SMESH_subMesh_var sm = aSubMeshes[i];
           if ( CORBA::is_nil( sm ) ) continue;
           _PTR(SObject) smSObj = SMESH::ObjectToSObject( sm );
@@ -1081,7 +1081,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
   else
   {
     bool onlyWarnings = !theNoCompError; // == valid mesh computed but there are errors reported
   else
   {
     bool onlyWarnings = !theNoCompError; // == valid mesh computed but there are errors reported
-    for ( int i = 0; i < theCompErrors->length() && onlyWarnings; ++i )
+    for ( CORBA::ULong i = 0; i < theCompErrors->length() && onlyWarnings; ++i )
       onlyWarnings = ( theCompErrors[ i ].code == SMESH::COMPERR_WARNING ||
                        theCompErrors[ i ].code == SMESH::COMPERR_NO_MESH_ON_SHAPE );
 
       onlyWarnings = ( theCompErrors[ i ].code == SMESH::COMPERR_WARNING ||
                        theCompErrors[ i ].code == SMESH::COMPERR_NO_MESH_ON_SHAPE );
 
@@ -1136,7 +1136,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
       tbl->setColumnWidth( COL_ERROR, 200 );
 
       bool hasBadMesh = false;
       tbl->setColumnWidth( COL_ERROR, 200 );
 
       bool hasBadMesh = false;
-      for ( int row = 0; row < theCompErrors->length(); ++row )
+      for ( int row = 0; row < (int) theCompErrors->length(); ++row )
       {
         SMESH::ComputeError & err = theCompErrors[ row ];
 
       {
         SMESH::ComputeError & err = theCompErrors[ row ];
 
@@ -1542,15 +1542,15 @@ LightApp_Dialog* SMESHGUI_ComputeOp::dlg() const
 //================================================================================
 /*!
  * \brief Constructor
 //================================================================================
 /*!
  * \brief Constructor
-*/
+ */
 //================================================================================
 
 SMESHGUI_PrecomputeOp::SMESHGUI_PrecomputeOp()
   : SMESHGUI_BaseComputeOp(),
 //================================================================================
 
 SMESHGUI_PrecomputeOp::SMESHGUI_PrecomputeOp()
   : SMESHGUI_BaseComputeOp(),
-    myDlg( 0 ),
-    myOrderMgr( 0 ),
     myActiveDlg( 0 ),
     myActiveDlg( 0 ),
-    myPreviewDisplayer( 0 )
+    myDlg( 0 ),
+    myPreviewDisplayer( 0 ),
+    myOrderMgr( 0 )
 {
 }
 
 {
 }
 
@@ -1962,7 +1962,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
 #endif
     aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     // check if there are memory problems
 #endif
     aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     // check if there are memory problems
-    for ( int i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
+    for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
       memoryLack = ( aCompErrors[ i ].code == SMESH::COMPERR_MEMORY_PB );
   }
   catch(const SALOME::SALOME_Exception & S_ex){
       memoryLack = ( aCompErrors[ i ].code == SMESH::COMPERR_MEMORY_PB );
   }
   catch(const SALOME::SALOME_Exception & S_ex){
@@ -2293,7 +2293,7 @@ void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
       tbl->setColumnWidth( COL_ERROR, 200 );
 
       bool hasBadMesh = false;
       tbl->setColumnWidth( COL_ERROR, 200 );
 
       bool hasBadMesh = false;
-      for ( int row = 0; row < theCompErrors->length(); ++row )
+      for ( int row = 0; row < (int) theCompErrors->length(); ++row )
       {
         SMESH::ComputeError & err = theCompErrors[ row ];
 
       {
         SMESH::ComputeError & err = theCompErrors[ row ];
 
index 06d9172e43f2560ee9c8085c573681e4811a30a2..7d1495845630e6fbd9f600b6915d085253a04773 100644 (file)
@@ -239,7 +239,9 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
           }
         }
         break;
           }
         }
         break;
-      }
+
+      default:;
+      } // switch( (*anIt).myValue.type() )
 
     if( w )
     {
 
     if( w )
     {
@@ -297,7 +299,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
   {
     SMESH::SObjectList listSOmesh = SMESH::GetMeshesUsingAlgoOrHypothesis( myHypo );
     if( listSOmesh.size() > 0 )
   {
     SMESH::SObjectList listSOmesh = SMESH::GetMeshesUsingAlgoOrHypothesis( myHypo );
     if( listSOmesh.size() > 0 )
-      for( int i = 0; i < listSOmesh.size(); i++ )
+      for( size_t i = 0; i < listSOmesh.size(); i++ )
       {
         _PTR(SObject) submSO = listSOmesh[i];
         SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( submSO );
       {
         _PTR(SObject) submSO = listSOmesh[i];
         SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( submSO );
@@ -391,8 +393,8 @@ QString SMESHGUI_GenericHypothesisCreator::stdParamValues( const ListOfStdParams
 {
   QString valueStr = "";
   ListOfStdParams::const_iterator param = params.begin(), aLast = params.end();
 {
   QString valueStr = "";
   ListOfStdParams::const_iterator param = params.begin(), aLast = params.end();
-  uint len0 = 0;
-  for( int i=0; param!=aLast; param++, i++ )
+  int len0 = 0;
+  for ( ; param != aLast; param++ )
   {
     if ( valueStr.length() > len0 ) {
       valueStr += "; ";
   {
     if ( valueStr.length() > len0 ) {
       valueStr += "; ";
@@ -749,12 +751,12 @@ HypothesisData::HypothesisData( const QString& theTypeName,
     Context( theContext ),
     Dim( theDim ),
     IsAuxOrNeedHyp( theIsAuxOrNeedHyp ),
     Context( theContext ),
     Dim( theDim ),
     IsAuxOrNeedHyp( theIsAuxOrNeedHyp ),
+    IsNeedGeometry( theIsNeedGeometry ),
+    IsSupportSubmeshes( supportSub ),
     BasicHypos( theBasicHypos ),
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
     BasicHypos( theBasicHypos ),
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
-    OutputTypes( theOutputTypes ),
-    IsNeedGeometry( theIsNeedGeometry ),
-    IsSupportSubmeshes( supportSub )
+    OutputTypes( theOutputTypes )
 {
 }
 
 {
 }
 
index 351639e8996ced854ba1501105c9a42571d5902f..1ddf9b2a4544bf4165bce0892e196df7d2e29f23 100644 (file)
 //================================================================================
 SMESHGUI_MeshOp::SMESHGUI_MeshOp( const bool theToCreate, const bool theIsMesh )
 : SMESHGUI_SelectionOp(),
 //================================================================================
 SMESHGUI_MeshOp::SMESHGUI_MeshOp( const bool theToCreate, const bool theIsMesh )
 : SMESHGUI_SelectionOp(),
-  myToCreate( theToCreate ),
-  myIsMesh( theIsMesh ),
   myDlg( 0 ),
   myShapeByMeshOp( 0 ),
   myDlg( 0 ),
   myShapeByMeshOp( 0 ),
+  myToCreate( theToCreate ),
+  myIsMesh( theIsMesh ),
   myHypoSet( 0 )
 {
   if ( GeometryGUI::GetGeomGen()->_is_nil() )// check that GEOM_Gen exists
   myHypoSet( 0 )
 {
   if ( GeometryGUI::GetGeomGen()->_is_nil() )// check that GEOM_Gen exists
@@ -576,7 +576,7 @@ void SMESHGUI_MeshOp::selectionDone()
 
       if (aSeq->length() > 0) {
         shapeDim = -1;
 
       if (aSeq->length() > 0) {
         shapeDim = -1;
-        for (int iss = 0; iss < aSeq->length() && shapeDim < 3; iss++) {
+        for ( CORBA::ULong iss = 0; iss < aSeq->length() && shapeDim < 3; iss++) {
           GEOM::GEOM_Object_var aGeomVar = aSeq[iss];
           switch ( aGeomVar->GetShapeType() ) {
           case GEOM::SOLID:  shapeDim = 3; break;
           GEOM::GEOM_Object_var aGeomVar = aSeq[iss];
           switch ( aGeomVar->GetShapeType() ) {
           case GEOM::SOLID:  shapeDim = 3; break;
index 206f4504e97784ff74d3f3a85b681b7d1b72172d..35bd506723b89850afe6e8260cb9dd2200a55bef 100644 (file)
@@ -157,15 +157,15 @@ private:
   bool                           myHasConcurrentSubBefore;
 
   TDim2Type2HypList              myExistingHyps; //!< all hypothesis of SMESH module
   bool                           myHasConcurrentSubBefore;
 
   TDim2Type2HypList              myExistingHyps; //!< all hypothesis of SMESH module
-  TDim2Type2HypList              myObjHyps;      //!< hypothesis assigned to the current 
+  TDim2Type2HypList              myObjHyps;      //!< hypothesis assigned to the current
                                                  //   edited mesh/sub-mesh
   // hypdata corresponding to hypotheses present in myDlg
   THypDataList                   myAvailableHypData[4][NbHypTypes];
   QString                        myLastGeomToSelect;
   THypLabelIsAppMap              myHypMapIsApplicable;
   bool                           myIgnoreAlgoSelection;
                                                  //   edited mesh/sub-mesh
   // hypdata corresponding to hypotheses present in myDlg
   THypDataList                   myAvailableHypData[4][NbHypTypes];
   QString                        myLastGeomToSelect;
   THypLabelIsAppMap              myHypMapIsApplicable;
   bool                           myIgnoreAlgoSelection;
-  HypothesesSet* myHypoSet;
-  int myDim, myType, myMaxShapeDim;
+  HypothesesSet*                 myHypoSet;
+  int                            myDim, myType, myMaxShapeDim;
 
   QString                        myObjectToSelect;
 };
 
   QString                        myObjectToSelect;
 };
index 8d138b46cee114b2425be891aa87241073809f16..10c1f533f1d4a238613f739a18aa51a1233d453c 100644 (file)
@@ -271,7 +271,7 @@ void SMESH_File::rewind()
 
 bool SMESH_File::getInts(std::vector<int>& ints)
 {
 
 bool SMESH_File::getInts(std::vector<int>& ints)
 {
-  int i = 0;
+  size_t i = 0;
   while ( i < ints.size() )
   {
     while ( !isdigit( *_pos ) && !eof()) ++_pos;
   while ( i < ints.size() )
   {
     while ( !isdigit( *_pos ) && !eof()) ++_pos;
@@ -330,7 +330,7 @@ bool SMESH_File::writeRaw(const void* data, size_t size)
 #else
 
   ssize_t nbWritten = ::write( _file, data, size );
 #else
 
   ssize_t nbWritten = ::write( _file, data, size );
-  return ( nbWritten == size );
+  return ( nbWritten == (ssize_t) size );
 
 #endif
 }
 
 #endif
 }
index 970d560e5f0a6d83097bf161c38e6f7c585c6b61..c9fcd85013fb991b19f7235285c15c7b1c79b03b 100644 (file)
@@ -448,14 +448,14 @@ namespace
                   addedEdges.insert( bndSegs[i]._edge->twin() ).second )
         {
           v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex0(), v2Node.size() + 1 )).first;
                   addedEdges.insert( bndSegs[i]._edge->twin() ).second )
         {
           v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex0(), v2Node.size() + 1 )).first;
-          int n0 = v2n->second;
+          size_t n0 = v2n->second;
           if ( n0 == v2Node.size() )
             text << "n" << n0 << " = m.AddNode( "
                  << bndSegs[i]._edge->vertex0()->x() / theScale[0] << ", "
                  << bndSegs[i]._edge->vertex0()->y() / theScale[1] << ", 0 )\n";
 
           v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex1(), v2Node.size() + 1 )).first;
           if ( n0 == v2Node.size() )
             text << "n" << n0 << " = m.AddNode( "
                  << bndSegs[i]._edge->vertex0()->x() / theScale[0] << ", "
                  << bndSegs[i]._edge->vertex0()->y() / theScale[1] << ", 0 )\n";
 
           v2n = v2Node.insert( make_pair( bndSegs[i]._edge->vertex1(), v2Node.size() + 1 )).first;
-          int n1 = v2n->second;
+          size_t n1 = v2n->second;
           if ( n1 == v2Node.size() )
             text << "n" << n1 << " = m.AddNode( "
                  << bndSegs[i]._edge->vertex1()->x() / theScale[0] << ", "
           if ( n1 == v2Node.size() )
             text << "n" << n1 << " = m.AddNode( "
                  << bndSegs[i]._edge->vertex1()->x() / theScale[0] << ", "
@@ -1210,7 +1210,7 @@ namespace
             else // bndSegs[ i ]._branchID > 0
             {
               dInd = +1;
             else // bndSegs[ i ]._branchID > 0
             {
               dInd = +1;
-              for ( edgeInd = 0; edgeInd < branchEdges[ brID ].size(); ++edgeInd )
+              for ( edgeInd = 0; edgeInd < (int)branchEdges[ brID ].size(); ++edgeInd )
                 if ( branchEdges[ brID ][ edgeInd ] == bndSegs[ i ]._edge )
                   break;
             }
                 if ( branchEdges[ brID ][ edgeInd ] == bndSegs[ i ]._edge )
                   break;
             }
@@ -1386,7 +1386,7 @@ bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge,
     int di = ( points._params[0] == points._params[i] ) ? +1 : -1;
     while ( points._params[i] == points._params[i+1] )
       i += di;
     int di = ( points._params[0] == points._params[i] ) ? +1 : -1;
     while ( points._params[i] == points._params[i+1] )
       i += di;
-    if ( i < 0 || i+1 >= points._params.size() )
+    if ( i < 0 || i+1 >= (int)points._params.size() )
       i = 0;
   }
 
       i = 0;
   }
 
@@ -1394,9 +1394,9 @@ bool SMESH_MAT2d::Boundary::getBranchPoint( const std::size_t iEdge,
 
   if ( !points._maEdges[ i ].second ) // no branch at the EDGE end, look for a closest branch
   {
 
   if ( !points._maEdges[ i ].second ) // no branch at the EDGE end, look for a closest branch
   {
-    if ( i < points._maEdges.size() / 2 ) // near 1st point
+    if ( i < (int)points._maEdges.size() / 2 ) // near 1st point
     {
     {
-      while ( i < points._maEdges.size()-1 && !points._maEdges[ i ].second )
+      while ( i < (int)points._maEdges.size()-1 && !points._maEdges[ i ].second )
         ++i;
       edgeParam = edgeReverse;
     }
         ++i;
       edgeParam = edgeReverse;
     }
@@ -1699,7 +1699,7 @@ bool SMESH_MAT2d::Branch::getParameter(const BranchPoint & p, double & u ) const
   if ( p._iEdge > _params.size()-1 )
     return false;
   if ( p._iEdge == _params.size()-1 )
   if ( p._iEdge > _params.size()-1 )
     return false;
   if ( p._iEdge == _params.size()-1 )
-    return u = 1.;
+    return ( u = 1. );
 
   u = ( _params[ p._iEdge   ] * ( 1 - p._edgeParam ) +
         _params[ p._iEdge+1 ] * p._edgeParam );
 
   u = ( _params[ p._iEdge   ] * ( 1 - p._edgeParam ) +
         _params[ p._iEdge+1 ] * p._edgeParam );
@@ -1805,7 +1805,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >&
   {
     // look for a VERTEX of the opposite EDGE
     // iNext - next after all null-length segments
   {
     // look for a VERTEX of the opposite EDGE
     // iNext - next after all null-length segments
-    while ( maE = ++iNext )
+    while (( maE = ++iNext ))
     {
       iSeg2 = getBndSegment( maE );
       if ( !_boundary->isConcaveSegment( ie1, iSeg2 ))
     {
       iSeg2 = getBndSegment( maE );
       if ( !_boundary->isConcaveSegment( ie1, iSeg2 ))
@@ -1837,7 +1837,7 @@ bool SMESH_MAT2d::Branch::addDivPntForConcaVertex( std::vector< std::size_t >&
   else if ( isConcaPrev )
   {
     // all null-length segments passed, find their beginning
   else if ( isConcaPrev )
   {
     // all null-length segments passed, find their beginning
-    while ( maE = iPrev.edgePrev() )
+    while (( maE = iPrev.edgePrev() ))
     {
       iSeg1 = getBndSegment( maE );
       if ( _boundary->isConcaveSegment( edgeIDs1.back(), iSeg1 ))
     {
       iSeg1 = getBndSegment( maE );
       if ( _boundary->isConcaveSegment( edgeIDs1.back(), iSeg1 ))
@@ -1909,7 +1909,7 @@ void SMESH_MAT2d::Branch::getOppositeGeomEdges( std::vector< std::size_t >& edge
   BranchPoint divisionPnt;
   divisionPnt._branch = this;
 
   BranchPoint divisionPnt;
   divisionPnt._branch = this;
 
-  for ( ++maIter, ++twIter; maIter.index() < _maEdges.size(); ++maIter, ++twIter )
+  for ( ++maIter, ++twIter; maIter.index() < (int)_maEdges.size(); ++maIter, ++twIter )
   {
     size_t ie1 = getGeomEdge( maIter.edge() );
     size_t ie2 = getGeomEdge( twIter.edge() );
   {
     size_t ie1 = getGeomEdge( maIter.edge() );
     size_t ie2 = getGeomEdge( twIter.edge() );
index eb7b2b864886bdf06190f7816b44535eb287da82..983aa064b924942baf611d12b3d1ccb642822683 100644 (file)
@@ -138,8 +138,8 @@ SMESH_Tree<BND_BOX,NB_CHILDREN>::SMESH_Tree (SMESH_TreeLimit* limit):
   myFather(0),
   myIsLeaf( false ),
   myLimit( limit ),
   myFather(0),
   myIsLeaf( false ),
   myLimit( limit ),
-  myLevel(0),
-  myBox(0)
+  myBox(0),
+  myLevel(0)
 {
   //if ( !myLimit ) myLimit = new SMESH_TreeLimit();
 }
 {
   //if ( !myLimit ) myLimit = new SMESH_TreeLimit();
 }
index fe64ce7b7b945ae122c9834fc52d74f8f30d54a7..532c9a450eae7f7bbd03badbf02eb52047eefbb8 100644 (file)
@@ -960,7 +960,7 @@ void SMESH_Gen_i::SetOption(const char* name, const char* value)
       // color must be presented as a string of next form:
       if ( str.at(0) == '#' && str.length() == 7 ) { // hexadecimal color ("#ffaa00", for example)
         str = str.substr(1);
       // color must be presented as a string of next form:
       if ( str.at(0) == '#' && str.length() == 7 ) { // hexadecimal color ("#ffaa00", for example)
         str = str.substr(1);
-        for ( int i = 0; i < str.length()/2; i++ )
+        for ( size_t i = 0; i < str.length()/2; i++ )
           if ( str.at(i*2) >= '0' && str.at(i*2) <= 'f' && str.at(i*2+1) >= '0' && str.at(i*2+1) <= 'f' )
             color.push_back( strtol( str.substr( i*2, 2 ).c_str(), NULL, 16 ) );
       }
           if ( str.at(i*2) >= '0' && str.at(i*2) <= 'f' && str.at(i*2+1) >= '0' && str.at(i*2+1) <= 'f' )
             color.push_back( strtol( str.substr( i*2, 2 ).c_str(), NULL, 16 ) );
       }
@@ -4896,7 +4896,7 @@ bool SMESH_Gen_i::LoadASCII( SALOMEDS::SComponent_ptr theComponent,
   _CORBA_Octet* buffer = new _CORBA_Octet[real_size];
   char tmp[3];
   tmp[2]='\0';
   _CORBA_Octet* buffer = new _CORBA_Octet[real_size];
   char tmp[3];
   tmp[2]='\0';
-  int c = -1;
+  uint c = -1;
   for ( int i = 0; i < real_size; i++ )
   {
     memcpy( &(tmp[0]), &(theStream[i*3+1]), 2 );
   for ( int i = 0; i < real_size; i++ )
   {
     memcpy( &(tmp[0]), &(theStream[i*3+1]), 2 );
index 0b927273c4ada665a02e6ea1013ad3285fcf220a..f31e583ebe935941469bc286e6a5755fa6469fd7 100644 (file)
@@ -285,13 +285,13 @@ namespace MeshEditor_I {
     SMDS_MeshElement::Filter & filter = *aFilter;
 
     if ( aType == SMDSAbs_Node )
     SMDS_MeshElement::Filter & filter = *aFilter;
 
     if ( aType == SMDSAbs_Node )
-      for (int i=0; i<IDs.length(); i++) {
+      for ( CORBA::ULong i = 0; i < IDs.length(); i++ ) {
         const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
         if ( filter( elem ))
           aMap.insert( aMap.end(), elem );
       }
     else
         const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
         if ( filter( elem ))
           aMap.insert( aMap.end(), elem );
       }
     else
-      for (int i=0; i<IDs.length(); i++) {
+      for ( CORBA::ULong i = 0; i<IDs.length(); i++) {
         const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
         if ( filter( elem ))
           aMap.insert( aMap.end(), elem );
         const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
         if ( filter( elem ))
           aMap.insert( aMap.end(), elem );
@@ -315,7 +315,7 @@ namespace MeshEditor_I {
     SMESH::long_array_var     aElementsId = theObject->GetIDs();
     if ( types->length() == 1 && types[0] == SMESH::NODE)
     {
     SMESH::long_array_var     aElementsId = theObject->GetIDs();
     if ( types->length() == 1 && types[0] == SMESH::NODE)
     {
-      for(int i = 0; i < aElementsId->length(); i++)
+      for ( CORBA::ULong i = 0; i < aElementsId->length(); i++ )
         if ( const SMDS_MeshNode * n = theMeshDS->FindNode( aElementsId[i] ))
           theNodeSet.insert( theNodeSet.end(), n);
     }
         if ( const SMDS_MeshNode * n = theMeshDS->FindNode( aElementsId[i] ))
           theNodeSet.insert( theNodeSet.end(), n);
     }
@@ -323,13 +323,13 @@ namespace MeshEditor_I {
     {
       SMDS_NodeIteratorPtr nIt = theMeshDS->nodesIterator();
       while ( nIt->more( ))
     {
       SMDS_NodeIteratorPtr nIt = theMeshDS->nodesIterator();
       while ( nIt->more( ))
-        if( const SMDS_MeshElement * elem = nIt->next() )
+        if ( const SMDS_MeshElement * elem = nIt->next() )
           theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());
     }
     else
     {
           theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());
     }
     else
     {
-      for(int i = 0; i < aElementsId->length(); i++)
-        if( const SMDS_MeshElement * elem = theMeshDS->FindElement( aElementsId[i] ))
+      for ( CORBA::ULong i = 0; i < aElementsId->length(); i++ )
+        if ( const SMDS_MeshElement * elem = theMeshDS->FindElement( aElementsId[i] ))
           theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());
     }
   }
           theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());
     }
   }
@@ -349,7 +349,7 @@ namespace MeshEditor_I {
     SMDSAbs_ElementType elemType    = (*theElements.begin())->GetType();
     bool sameElemType = ( elemType == (*theElements.rbegin())->GetType() );
     if ( sameElemType &&
     SMDSAbs_ElementType elemType    = (*theElements.begin())->GetType();
     bool sameElemType = ( elemType == (*theElements.rbegin())->GetType() );
     if ( sameElemType &&
-         theMeshDS->GetMeshInfo().NbElements( elemType ) == theElements.size() )
+         theMeshDS->GetMeshInfo().NbElements( elemType ) == (int) theElements.size() )
       return; // all the elements are in theElements
 
     if ( !sameElemType )
       return; // all the elements are in theElements
 
     if ( !sameElemType )
@@ -794,7 +794,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
 
   list< int > IdList;
 
 
   list< int > IdList;
 
-  for (int i = 0; i < IDsOfElements.length(); i++)
+  for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
     IdList.push_back( IDsOfElements[i] );
 
   // Update Python script
     IdList.push_back( IDsOfElements[i] );
 
   // Update Python script
@@ -823,7 +823,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNo
   initData();
 
   list< int > IdList;
   initData();
 
   list< int > IdList;
-  for (int i = 0; i < IDsOfNodes.length(); i++)
+  for ( CORBA::ULong i = 0; i < IDsOfNodes.length(); i++)
     IdList.push_back( IDsOfNodes[i] );
 
   // Update Python script
     IdList.push_back( IDsOfNodes[i] );
 
   // Update Python script
@@ -859,9 +859,7 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
   SMESH::Controls::Filter::GetElementsId( getMeshDS(), predicate, seq );
 
   // remove orphan nodes (if there are any)
   SMESH::Controls::Filter::GetElementsId( getMeshDS(), predicate, seq );
 
   // remove orphan nodes (if there are any)
-  list< int > IdList;
-  for ( int i = 0; i < seq.size(); i++ )
-    IdList.push_back( seq[i] );
+  list< int > IdList( seq.begin(), seq.end() );
 
   int nbNodesBefore = myMesh->NbNodes();
   getEditor().Remove( IdList, true );
 
   int nbNodesBefore = myMesh->NbNodes();
   getEditor().Remove( IdList, true );
@@ -1584,7 +1582,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::long_array & IDsOfEleme
   SMESH_TRY;
   initData();
 
   SMESH_TRY;
   initData();
 
-  for (int i = 0; i < IDsOfElements.length(); i++)
+  for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
   {
     CORBA::Long index = IDsOfElements[i];
     const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
   {
     CORBA::Long index = IDsOfElements[i];
     const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
@@ -2273,7 +2271,7 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array &              IDsOfElements,
   arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
 
   set<const SMDS_MeshNode*> fixedNodes;
   arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
 
   set<const SMDS_MeshNode*> fixedNodes;
-  for (int i = 0; i < IDsOfFixedNodes.length(); i++) {
+  for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) {
     CORBA::Long index = IDsOfFixedNodes[i];
     const SMDS_MeshNode * node = aMesh->FindNode(index);
     if ( node )
     CORBA::Long index = IDsOfFixedNodes[i];
     const SMDS_MeshNode * node = aMesh->FindNode(index);
     if ( node )
@@ -2866,7 +2864,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the
     idSourceToSet( theFaces[i], getMeshDS(), elemsNodes[0], SMDSAbs_Face );
 
   list<double> angles;
     idSourceToSet( theFaces[i], getMeshDS(), elemsNodes[0], SMDSAbs_Face );
 
   list<double> angles;
-  for (int i = 0; i < theAngles.length(); i++) {
+  for ( CORBA::ULong i = 0; i < theAngles.length(); i++ ) {
     angles.push_back( theAngles[i] );
   }
 
     angles.push_back( theAngles[i] );
   }
 
@@ -4091,7 +4089,7 @@ FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr      theObject,
   TIDSortedNodeSet nodes;
   idSourceToNodeSet( theObject, getMeshDS(), nodes );
 
   TIDSortedNodeSet nodes;
   idSourceToNodeSet( theObject, getMeshDS(), nodes );
 
-  for ( int i = 0; i < theExceptSubMeshOrGroups.length(); ++i )
+  for ( CORBA::ULong i = 0; i < theExceptSubMeshOrGroups.length(); ++i )
   {
     SMDS_ElemIteratorPtr nodeIt = myMesh_i->GetElements( theExceptSubMeshOrGroups[i],
                                                          SMESH::NODE );
   {
     SMDS_ElemIteratorPtr nodeIt = myMesh_i->GetElements( theExceptSubMeshOrGroups[i],
                                                          SMESH::NODE );
@@ -4127,7 +4125,7 @@ void SMESH_MeshEditor_i::MergeNodes (const SMESH::array_of_long_array& GroupsOfN
   aTPythonDump << this << ".MergeNodes([";
 
   TIDSortedNodeSet setOfNodesToKeep;
   aTPythonDump << this << ".MergeNodes([";
 
   TIDSortedNodeSet setOfNodesToKeep;
-  for ( int i = 0; i < NodesToKeep.length(); ++i )
+  for ( CORBA::ULong i = 0; i < NodesToKeep.length(); ++i )
   {
     prepareIdSource( NodesToKeep[i] );
     SMDS_ElemIteratorPtr nodeIt = myMesh_i->GetElements( NodesToKeep[i], SMESH::NODE );
   {
     prepareIdSource( NodesToKeep[i] );
     SMDS_ElemIteratorPtr nodeIt = myMesh_i->GetElements( NodesToKeep[i], SMESH::NODE );
@@ -4136,12 +4134,12 @@ void SMESH_MeshEditor_i::MergeNodes (const SMESH::array_of_long_array& GroupsOfN
   }
 
   ::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
   }
 
   ::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
-  for (int i = 0; i < GroupsOfNodes.length(); i++)
+  for ( CORBA::ULong i = 0; i < GroupsOfNodes.length(); i++ )
   {
     const SMESH::long_array& aNodeGroup = GroupsOfNodes[ i ];
     aListOfListOfNodes.push_back( list< const SMDS_MeshNode* >() );
     list< const SMDS_MeshNode* >& aListOfNodes = aListOfListOfNodes.back();
   {
     const SMESH::long_array& aNodeGroup = GroupsOfNodes[ i ];
     aListOfListOfNodes.push_back( list< const SMDS_MeshNode* >() );
     list< const SMDS_MeshNode* >& aListOfNodes = aListOfListOfNodes.back();
-    for ( int j = 0; j < aNodeGroup.length(); j++ )
+    for ( CORBA::ULong j = 0; j < aNodeGroup.length(); j++ )
     {
       CORBA::Long index = aNodeGroup[ j ];
       if ( const SMDS_MeshNode * node = aMesh->FindNode( index ))
     {
       CORBA::Long index = aNodeGroup[ j ];
       if ( const SMDS_MeshNode * node = aMesh->FindNode( index ))
@@ -4227,11 +4225,11 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& GroupsO
 
   ::SMESH_MeshEditor::TListOfListOfElementsID aListOfListOfElementsID;
 
 
   ::SMESH_MeshEditor::TListOfListOfElementsID aListOfListOfElementsID;
 
-  for (int i = 0; i < GroupsOfElementsID.length(); i++) {
+  for ( CORBA::ULong i = 0; i < GroupsOfElementsID.length(); i++ ) {
     const SMESH::long_array& anElemsIDGroup = GroupsOfElementsID[ i ];
     aListOfListOfElementsID.push_back( list< int >() );
     list< int >& aListOfElemsID = aListOfListOfElementsID.back();
     const SMESH::long_array& anElemsIDGroup = GroupsOfElementsID[ i ];
     aListOfListOfElementsID.push_back( list< int >() );
     list< int >& aListOfElemsID = aListOfListOfElementsID.back();
-    for ( int j = 0; j < anElemsIDGroup.length(); j++ ) {
+    for ( CORBA::ULong j = 0; j < anElemsIDGroup.length(); j++ ) {
       CORBA::Long id = anElemsIDGroup[ j ];
       aListOfElemsID.push_back( id );
     }
       CORBA::Long id = anElemsIDGroup[ j ];
       aListOfElemsID.push_back( id );
     }
@@ -4456,7 +4454,7 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double      x,
                                            SMDSAbs_ElementType( type ),
                                            foundElems);
   res->length( foundElems.size() );
                                            SMDSAbs_ElementType( type ),
                                            foundElems);
   res->length( foundElems.size() );
-  for ( int i = 0; i < foundElems.size(); ++i )
+  for ( size_t i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
   return res._retn();
     res[i] = foundElems[i]->GetID();
 
   return res._retn();
@@ -4517,7 +4515,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
                                            SMDSAbs_ElementType( type ),
                                            foundElems);
   res->length( foundElems.size() );
                                            SMDSAbs_ElementType( type ),
                                            foundElems);
   res->length( foundElems.size() );
-  for ( int i = 0; i < foundElems.size(); ++i )
+  for ( size_t i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
   return res._retn();
     res[i] = foundElems[i]->GetID();
 
   return res._retn();
@@ -4568,6 +4566,7 @@ static SMESH::SMESH_MeshEditor::Sew_Error convError( const::SMESH_MeshEditor::Se
     RETCASE( SEW_TOPO_DIFF_SETS_OF_ELEMENTS );
     RETCASE( SEW_BAD_SIDE1_NODES );
     RETCASE( SEW_BAD_SIDE2_NODES );
     RETCASE( SEW_TOPO_DIFF_SETS_OF_ELEMENTS );
     RETCASE( SEW_BAD_SIDE1_NODES );
     RETCASE( SEW_BAD_SIDE2_NODES );
+    RETCASE( SEW_INTERNAL_ERROR );
   }
   return SMESH::SMESH_MeshEditor::SEW_OK;
 }
   }
   return SMESH::SMESH_MeshEditor::SEW_OK;
 }
@@ -4651,16 +4650,16 @@ SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders,
     for ( CORBA::ULong iP = 0; iP < aGRP.length(); ++iP )
     {
       const SMESH::FreeBorderPart& aPART = aGRP[ iP ];
     for ( CORBA::ULong iP = 0; iP < aGRP.length(); ++iP )
     {
       const SMESH::FreeBorderPart& aPART = aGRP[ iP ];
-      if ( aPART.border < 0 || aPART.border >= freeBorders.borders.length() )
+      if ( aPART.border < 0 || aPART.border >= (int) freeBorders.borders.length() )
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::border index", SALOME::BAD_PARAM);
 
       const SMESH::FreeBorder& aBRD = freeBorders.borders[ aPART.border ];
 
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::border index", SALOME::BAD_PARAM);
 
       const SMESH::FreeBorder& aBRD = freeBorders.borders[ aPART.border ];
 
-      if ( aPART.node1 < 0 || aPART.node1 > aBRD.nodeIDs.length() )
+      if ( aPART.node1 < 0 || aPART.node1 > (int) aBRD.nodeIDs.length() )
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::node1", SALOME::BAD_PARAM);
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::node1", SALOME::BAD_PARAM);
-      if ( aPART.node2 < 0 || aPART.node2 > aBRD.nodeIDs.length() )
+      if ( aPART.node2 < 0 || aPART.node2 > (int) aBRD.nodeIDs.length() )
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::node2", SALOME::BAD_PARAM);
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::node2", SALOME::BAD_PARAM);
-      if ( aPART.nodeLast < 0 || aPART.nodeLast > aBRD.nodeIDs.length() )
+      if ( aPART.nodeLast < 0 || aPART.nodeLast > (int) aBRD.nodeIDs.length() )
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::nodeLast", SALOME::BAD_PARAM);
 
       // do not keep these nodes for further sewing as nodes can be removed by the sewing
         THROW_SALOME_CORBA_EXCEPTION("Invalid FreeBorderPart::nodeLast", SALOME::BAD_PARAM);
 
       // do not keep these nodes for further sewing as nodes can be removed by the sewing
@@ -6500,7 +6499,7 @@ void SMESH_MeshEditor_i::CreateHoleSkin(CORBA::Double                  radius,
     theNodeSearcher = SMESH_MeshAlgos::GetNodeSearcher( *getMeshDS() );
 
   vector<double> nodesCoords;
     theNodeSearcher = SMESH_MeshAlgos::GetNodeSearcher( *getMeshDS() );
 
   vector<double> nodesCoords;
-  for (int i = 0; i < theNodesCoords.length(); i++)
+  for ( CORBA::ULong i = 0; i < theNodesCoords.length(); i++)
   {
     nodesCoords.push_back( theNodesCoords[i] );
   }
   {
     nodesCoords.push_back( theNodesCoords[i] );
   }
@@ -6666,7 +6665,7 @@ CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
   groupsOfThisMesh ->length( groups.length() );
   groupsOfOtherMesh->length( groups.length() );
   int nbGroups = 0, nbGroupsOfOtherMesh = 0;
   groupsOfThisMesh ->length( groups.length() );
   groupsOfOtherMesh->length( groups.length() );
   int nbGroups = 0, nbGroupsOfOtherMesh = 0;
-  for ( int i = 0; i < groups.length(); ++i )
+  for ( CORBA::ULong i = 0; i < groups.length(); ++i )
   {
     SMESH::SMESH_Mesh_var m = groups[i]->GetMesh();
     if ( myMesh_i != SMESH::DownCast<SMESH_Mesh_i*>( m ))
   {
     SMESH::SMESH_Mesh_var m = groups[i]->GetMesh();
     if ( myMesh_i != SMESH::DownCast<SMESH_Mesh_i*>( m ))
index 943a1b76738ae4c9d42e335936b3a649a0f27322..75297f2dbfa217a62c1151882b93175399515e62 100644 (file)
@@ -53,7 +53,7 @@ namespace
    */
   void SetVariable(Handle(_pyCommand) theCommand,
                    const SMESH_ObjectStates* theStates,
    */
   void SetVariable(Handle(_pyCommand) theCommand,
                    const SMESH_ObjectStates* theStates,
-                   int position, int theArgNb)
+                   size_t position, int theArgNb)
   {
     if(theStates->GetCurrectState().size() > position)
       if(!theStates->GetCurrectState().at(position).IsEmpty())
   {
     if(theStates->GetCurrectState().size() > position)
       if(!theStates->GetCurrectState().at(position).IsEmpty())
@@ -100,7 +100,7 @@ void SMESH_ObjectStates::AddState(const TState &theState)
 //================================================================================
 TState SMESH_ObjectStates::GetCurrectState() const
 {
 //================================================================================
 TState SMESH_ObjectStates::GetCurrectState() const
 {
-  if(_states.size() > _dumpstate)
+  if ( (int) _states.size() > _dumpstate)
     return _states[_dumpstate];
   TState empty;
   return empty;
     return _states[_dumpstate];
   TState empty;
   return empty;
@@ -236,7 +236,7 @@ SMESH_NoteBook::~SMESH_NoteBook()
 //================================================================================
 void SMESH_NoteBook::ReplaceVariables()
 {
 //================================================================================
 void SMESH_NoteBook::ReplaceVariables()
 {
-  for(int i=0;i<_commands.size();i++)
+  for ( size_t i = 0 ; i < _commands.size(); i++ )
   {
     Handle(_pyCommand) aCmd = _commands[i];
     TCollection_AsciiString aMethod      = aCmd->GetMethod();
   {
     Handle(_pyCommand) aCmd = _commands[i];
     TCollection_AsciiString aMethod      = aCmd->GetMethod();
@@ -714,7 +714,7 @@ void SMESH_NoteBook::ReplaceVariables()
         {
           TState aCurrentState = aStates->GetCurrectState();
           int         argIndex = h->getParamIndex( aMethod, aCurrentState.size() );
         {
           TState aCurrentState = aStates->GetCurrectState();
           int         argIndex = h->getParamIndex( aMethod, aCurrentState.size() );
-          if ( 0 <= argIndex && argIndex < aCurrentState.size() &&
+          if ( 0 <= argIndex && argIndex < (int)aCurrentState.size() &&
                !aCurrentState[argIndex].IsEmpty() )
             aCmd->SetArg( 1, aCurrentState[argIndex] );
 
                !aCurrentState[argIndex].IsEmpty() )
             aCmd->SetArg( 1, aCurrentState[argIndex] );
 
@@ -790,10 +790,10 @@ void SMESH_NoteBook::InitObjectMap()
       else
         aState = new SMESH_ObjectStates(anObjType);
 
       else
         aState = new SMESH_ObjectStates(anObjType);
 
-      for(int i = 0; i < aSections->length(); i++) {
+      for ( size_t i = 0; i < aSections->length(); i++ ) {
         TState aVars;
         SALOMEDS::ListOfStrings aListOfVars = aSections[i];
         TState aVars;
         SALOMEDS::ListOfStrings aListOfVars = aSections[i];
-        for ( int j = 0; j<aListOfVars.length(); j++)
+        for ( size_t j = 0; j < aListOfVars.length(); j++)
         {
           TCollection_AsciiString aVar(aListOfVars[j].in());
           if(!aVar.IsEmpty() && aStudy->IsVariable(aVar.ToCString())) {
         {
           TCollection_AsciiString aVar(aListOfVars[j].in());
           if(!aVar.IsEmpty() && aStudy->IsVariable(aVar.ToCString())) {
@@ -859,8 +859,8 @@ void SMESH_NoteBook::ProcessLayerDistribution()
     return;
   
   // 2) Initialize all type of 1D Distribution hypothesis
     return;
   
   // 2) Initialize all type of 1D Distribution hypothesis
-  for(int i=0;i<_commands.size();i++){
-    for(int j =0;j < aLDS.size();j++){
+  for ( size_t i = 0; i < _commands.size(); i++ ) {
+    for ( size_t j = 0; j < aLDS.size(); j++ ) {
       TCollection_AsciiString aResultValue = _commands[i]->GetResultValue();
       if(_commands[i]->GetMethod() == "CreateHypothesis" &&
          aLDS[j]->HasDistribution(aResultValue)){
       TCollection_AsciiString aResultValue = _commands[i]->GetResultValue();
       if(_commands[i]->GetMethod() == "CreateHypothesis" &&
          aLDS[j]->HasDistribution(aResultValue)){
@@ -872,8 +872,8 @@ void SMESH_NoteBook::ProcessLayerDistribution()
   }
   // 3) ... and replase variables ...
 
   }
   // 3) ... and replase variables ...
 
-  for(int i=0;i<_commands.size();i++){
-    for(int j =0;j < aLDS.size();j++){
+  for ( size_t i = 0; i < _commands.size(); i++ ) {
+    for ( size_t j = 0; j < aLDS.size(); j++ ) {
       TCollection_AsciiString anObject = _commands[i]->GetObject();
 
       if(aLDS[j]->HasDistribution(anObject)) {
       TCollection_AsciiString anObject = _commands[i]->GetObject();
 
       if(aLDS[j]->HasDistribution(anObject)) {
@@ -929,8 +929,8 @@ void SMESH_NoteBook::ProcessLayerDistribution()
 TCollection_AsciiString SMESH_NoteBook::GetResultScript() const
 {
   TCollection_AsciiString aResult;
 TCollection_AsciiString SMESH_NoteBook::GetResultScript() const
 {
   TCollection_AsciiString aResult;
-  for(int i=0;i<_commands.size();i++)
-    aResult+=_commands[i]->GetString()+"\n";
+  for ( size_t i = 0; i < _commands.size(); i++ )
+    aResult += _commands[i]->GetString() + "\n";
   return aResult;
 }
 
   return aResult;
 }
 
@@ -941,7 +941,7 @@ TCollection_AsciiString SMESH_NoteBook::GetResultScript() const
 //================================================================================
 void SMESH_NoteBook::GetResultLines(std::list< TCollection_AsciiString >& lines) const
 {
 //================================================================================
 void SMESH_NoteBook::GetResultLines(std::list< TCollection_AsciiString >& lines) const
 {
-  for(int i=0;i<_commands.size();i++)
+  for ( size_t i = 0; i < _commands.size(); i++ )
     lines.push_back( _commands[i]->GetString() );
 }
 
     lines.push_back( _commands[i]->GetString() );
 }
 
index 2fc76a7b3d555c566c08102b30fce5ffa19a4580..8ffcc0ce255b21818cd42c9fc905a41763123887 100644 (file)
@@ -992,7 +992,7 @@ ostream & StdMeshers_Adaptive1D::SaveTo(ostream & save)
 istream & StdMeshers_Adaptive1D::LoadFrom(istream & load)
 {
   int dummyParam;
 istream & StdMeshers_Adaptive1D::LoadFrom(istream & load)
 {
   int dummyParam;
-  bool isOK = (load >> myMinSize >> myMaxSize >> myDeflection >> dummyParam >> dummyParam);
+  bool isOK = static_cast<bool>(load >> myMinSize >> myMaxSize >> myDeflection >> dummyParam >> dummyParam);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
index 2642dd1af0db6b91a7af20c067dfc6bb5a3c51e9..deabddb71037f2bd1c802e22587dff7aa05f1b87 100644 (file)
@@ -144,22 +144,22 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load)
 {
   bool isOK = true;
   int intVal;
 {
   bool isOK = true;
   int intVal;
-  isOK = (load >> _begLength);
+  isOK = static_cast<bool>(load >> _begLength);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
-  isOK = (load >> _endLength);
+  isOK = static_cast<bool>(load >> _endLength);
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
   }
 
   return load;
index 6d8135590881ee261260d7d6b46cbcf9074255db..7226e4beb656deae5ac2a67643e58d55a33c4a9e 100644 (file)
@@ -799,51 +799,51 @@ std::istream & StdMeshers_CartesianParameters3D::LoadFrom(std::istream & load)
 {
   bool ok;
 
 {
   bool ok;
 
-  ok = ( load >> _sizeThreshold );
+  ok = static_cast<bool>( load >> _sizeThreshold );
   for ( int ax = 0; ax < 3; ++ax )
   {
     if (ok)
     {
       size_t i = 0;
   for ( int ax = 0; ax < 3; ++ax )
   {
     if (ok)
     {
       size_t i = 0;
-      ok = (load >> i  );
+      ok = static_cast<bool>(load >> i  );
       if ( i > 0 && ok )
       {
         _coords[ax].resize( i );
         for ( i = 0; i < _coords[ax].size() && ok; ++i )
       if ( i > 0 && ok )
       {
         _coords[ax].resize( i );
         for ( i = 0; i < _coords[ax].size() && ok; ++i )
-          ok = (load >> _coords[ax][i]  );
+          ok = static_cast<bool>(load >> _coords[ax][i]  );
       }
     }
     if (ok)
     {
       size_t i = 0;
       }
     }
     if (ok)
     {
       size_t i = 0;
-      ok = (load >> i  );
+      ok = static_cast<bool>(load >> i  );
       if ( i > 0 && ok )
       {
         _internalPoints[ax].resize( i );
         for ( i = 0; i < _internalPoints[ax].size() && ok; ++i )
       if ( i > 0 && ok )
       {
         _internalPoints[ax].resize( i );
         for ( i = 0; i < _internalPoints[ax].size() && ok; ++i )
-          ok = (load >> _internalPoints[ax][i]  );
+          ok = static_cast<bool>(load >> _internalPoints[ax][i]  );
       }
     }
     if (ok)
     {
       size_t i = 0;
       }
     }
     if (ok)
     {
       size_t i = 0;
-      ok = (load >> i  );
+      ok = static_cast<bool>(load >> i  );
       if ( i > 0 && ok )
       {
         _spaceFunctions[ax].resize( i );
         for ( i = 0; i < _spaceFunctions[ax].size() && ok; ++i )
       if ( i > 0 && ok )
       {
         _spaceFunctions[ax].resize( i );
         for ( i = 0; i < _spaceFunctions[ax].size() && ok; ++i )
-          ok = (load >> _spaceFunctions[ax][i]  );
+          ok = static_cast<bool>(load >> _spaceFunctions[ax][i]  );
       }
     }
   }
 
       }
     }
   }
 
-  ok = ( load >> _toAddEdges );
+  ok = static_cast<bool>( load >> _toAddEdges );
 
   for ( int i = 0; i < 9 && ok; ++i )
 
   for ( int i = 0; i < 9 && ok; ++i )
-    ok = ( load >> _axisDirs[i]);
+    ok = static_cast<bool>( load >> _axisDirs[i]);
 
   for ( int i = 0; i < 3 && ok ; ++i )
 
   for ( int i = 0; i < 3 && ok ; ++i )
-    ok = ( load >> _fixedPoint[i]);
+    ok = static_cast<bool>( load >> _fixedPoint[i]);
 
   return load;
 }
 
   return load;
 }
index c2aa6f3e490b24dce2f91bbfdaf03c27bc2a363c..b896de3b62f0ec672de68392e88335d9d0305fc5 100644 (file)
@@ -696,17 +696,17 @@ namespace
                            int& di, double tol )
   {
     //val += values[0]; // input \a val is measured from 0.
                            int& di, double tol )
   {
     //val += values[0]; // input \a val is measured from 0.
-    if ( i > values.size()-2 )
+    if ( i > (int) values.size()-2 )
       i = values.size()-2;
     else
       i = values.size()-2;
     else
-      while ( i+2 < values.size() && val > values[ i+1 ])
+      while ( i+2 < (int) values.size() && val > values[ i+1 ])
         ++i;
     while ( i > 0 && val < values[ i ])
       --i;
 
     if ( i > 0 && val - values[ i ] < tol )
       di = -1;
         ++i;
     while ( i > 0 && val < values[ i ])
       --i;
 
     if ( i > 0 && val - values[ i ] < tol )
       di = -1;
-    else if ( i+2 < values.size() && values[ i+1 ] - val < tol )
+    else if ( i+2 < (int) values.size() && values[ i+1 ] - val < tol )
       di = 1;
     else
       di = 0;
       di = 1;
     else
       di = 0;
@@ -1776,7 +1776,7 @@ namespace
         if ( quad._eIntNodes[ iP ]->IsUsedInFace( polygon ))
           quad._eIntNodes[ iP ]->_usedInFace = 0;
 #endif
         if ( quad._eIntNodes[ iP ]->IsUsedInFace( polygon ))
           quad._eIntNodes[ iP ]->_usedInFace = 0;
 #endif
-      int nbUsedEdgeNodes = 0;
+      size_t nbUsedEdgeNodes = 0;
       _Face* prevPolyg = 0; // polygon previously created from this quad
 
       while ( nbSplits > 0 )
       _Face* prevPolyg = 0; // polygon previously created from this quad
 
       while ( nbSplits > 0 )
@@ -1839,7 +1839,7 @@ namespace
             else
             {
               _OrientedLink foundSplit;
             else
             {
               _OrientedLink foundSplit;
-              for ( int i = iS; i < splits.size() && !foundSplit; ++i )
+              for ( size_t i = iS; i < splits.size() && !foundSplit; ++i )
                 if (( foundSplit = splits[ i ]) &&
                     ( n2->IsLinked( foundSplit.FirstNode()->_intPoint )))
                 {
                 if (( foundSplit = splits[ i ]) &&
                     ( n2->IsLinked( foundSplit.FirstNode()->_intPoint )))
                 {
@@ -2100,7 +2100,7 @@ namespace
             {
               sortVertexNodes( chainNodes, curNode, curFace );
             }
             {
               sortVertexNodes( chainNodes, curNode, curFace );
             }
-            for ( int i = 0; i < chainNodes.size(); ++i )
+            for ( size_t i = 0; i < chainNodes.size(); ++i )
             {
               polygon.AddPolyLink( chainNodes[ i ], curNode );
               curNode = chainNodes[ i ];
             {
               polygon.AddPolyLink( chainNodes[ i ], curNode );
               curNode = chainNodes[ i ];
@@ -2322,9 +2322,9 @@ namespace
             i = int(lineInd.I()) + dInd[iL][0];
             j = int(lineInd.J()) + dInd[iL][1];
             k = int(lineInd.K()) + dInd[iL][2];
             i = int(lineInd.I()) + dInd[iL][0];
             j = int(lineInd.J()) + dInd[iL][1];
             k = int(lineInd.K()) + dInd[iL][2];
-            if ( i < 0 || i >= nbCells[0] ||
-                 j < 0 || j >= nbCells[1] ||
-                 k < 0 || k >= nbCells[2] ) continue;
+            if ( i < 0 || i >= (int) nbCells[0] ||
+                 j < 0 || j >= (int) nbCells[1] ||
+                 k < 0 || k >= (int) nbCells[2] ) continue;
 
             const size_t hexIndex = _grid->CellIndex( i,j,k );
             Hexahedron *& hex = allHexa[ hexIndex ];
 
             const size_t hexIndex = _grid->CellIndex( i,j,k );
             Hexahedron *& hex = allHexa[ hexIndex ];
@@ -2436,7 +2436,7 @@ namespace
         planes._zProjs [0] = 0;
         const double       zFactor = _grid->_axes[ iDirZ ] * planes._zNorm;
         const vector< double > & u = _grid->_coords[ iDirZ ];
         planes._zProjs [0] = 0;
         const double       zFactor = _grid->_axes[ iDirZ ] * planes._zNorm;
         const vector< double > & u = _grid->_coords[ iDirZ ];
-        for ( int i = 1; i < planes._zProjs.size(); ++i )
+        for ( size_t i = 1; i < planes._zProjs.size(); ++i )
         {
           planes._zProjs [i] = zFactor * ( u[i] - u[0] );
         }
         {
           planes._zProjs [i] = zFactor * ( u[i] - u[0] );
         }
@@ -2870,7 +2870,7 @@ namespace
   {
     bool isOut = false;
 
   {
     bool isOut = false;
 
-    const bool moreIntPoints = ( iP+1 < link._fIntPoints.size() );
+    const bool moreIntPoints = ( iP+1 < (int) link._fIntPoints.size() );
 
     // get 2 _Node's
     _Node* n1 = link._fIntNodes[ iP ];
 
     // get 2 _Node's
     _Node* n1 = link._fIntNodes[ iP ];
@@ -3049,7 +3049,7 @@ namespace
     // sort nodes accoring to the order of edges
     _Node*  orderNodes   [20];
     TGeomID orderShapeIDs[20];
     // sort nodes accoring to the order of edges
     _Node*  orderNodes   [20];
     TGeomID orderShapeIDs[20];
-    int nbN = 0;
+    size_t nbN = 0;
     TGeomID id, *pID;
     for ( e = edges.begin(); e != edges.end(); ++e )
     {
     TGeomID id, *pID;
     for ( e = edges.begin(); e != edges.end(); ++e )
     {
@@ -3536,7 +3536,7 @@ bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh &         theMesh,
     map< TGeomID, vector< TGeomID > > edge2faceIDsMap;
     TopExp_Explorer eExp;
     Bnd_Box shapeBox;
     map< TGeomID, vector< TGeomID > > edge2faceIDsMap;
     TopExp_Explorer eExp;
     Bnd_Box shapeBox;
-    for ( int i = 0; i < faceVec.size(); ++i )
+    for ( size_t i = 0; i < faceVec.size(); ++i )
     {
       facesItersectors[i]._face   = TopoDS::Face    ( faceVec[i] );
       facesItersectors[i]._faceID = grid._shapes.Add( faceVec[i] );
     {
       facesItersectors[i]._face   = TopoDS::Face    ( faceVec[i] );
       facesItersectors[i]._faceID = grid._shapes.Add( faceVec[i] );
index 2fbaefb01b7386bbe912df73ea3a5f8d06b8d6e5..d2bc5501cbe047c592be4aa451a151976e87dfe6 100644 (file)
@@ -119,7 +119,7 @@ ostream & StdMeshers_Deflection1D::SaveTo(ostream & save)
 
 istream & StdMeshers_Deflection1D::LoadFrom(istream & load)
 {
 
 istream & StdMeshers_Deflection1D::LoadFrom(istream & load)
 {
-  bool isOK = (load >> _value);
+  bool isOK = static_cast<bool>(load >> _value);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
index 455f82baeb9c78cade280b6f710ffbf322c36920..574466cc7ef1ba00de342a8b69f53ff2d9c32f5b 100644 (file)
@@ -132,8 +132,8 @@ bool FunctionTable::value( const double t, double& f ) const
 
 double FunctionTable::integral( const int i ) const
 {
 
 double FunctionTable::integral( const int i ) const
 {
-  if( i>=0 && i<myData.size()-1 )
-    return integral( i, myData[2*(i+1)]-myData[2*i] );
+  if ( i >= 0  &&  i < (int)myData.size()-1 )
+    return integral( i, myData[2*(i+1)] - myData[2*i] );
   else
     return 0;
 }
   else
     return 0;
 }
index 2625b9fb1322eab64c256b743d3c76a64c076069..3849040e995afa5de3d232518f36b7dd3410fdac 100644 (file)
@@ -310,14 +310,14 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
     if ( NbEdges() == 0 ) return myPoints;
 
     StdMeshers_FaceSide* me = const_cast< StdMeshers_FaceSide* >( this );
     if ( NbEdges() == 0 ) return myPoints;
 
     StdMeshers_FaceSide* me = const_cast< StdMeshers_FaceSide* >( this );
-    SMESHDS_Mesh*    meshDS = myProxyMesh->GetMeshDS();
+    //SMESHDS_Mesh*    meshDS = myProxyMesh->GetMeshDS();
     SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
     SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
     fHelper.SetSubShape( myFace );
     bool paramOK;
     double eps = 1e-100;
 
     SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
     SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
     fHelper.SetSubShape( myFace );
     bool paramOK;
     double eps = 1e-100;
 
-    // sort nodes of all edges putting them into a map
+    // sort nodes of all edges by putting them into a map
 
     map< double, const SMDS_MeshNode*>            u2node;
     vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
 
     map< double, const SMDS_MeshNode*>            u2node;
     vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
@@ -428,8 +428,8 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
       u2node.insert( u2node.end(), make_pair( 1., node ));
     }
 
       u2node.insert( u2node.end(), make_pair( 1., node ));
     }
 
-    if ( u2node.size() + nbProxyNodes != myNbPonits &&
-         u2node.size() + nbProxyNodes != NbPoints( /*update=*/true ))
+    if ((int) u2node.size() + nbProxyNodes != myNbPonits &&
+        (int) u2node.size() + nbProxyNodes != NbPoints( /*update=*/true ))
     {
       MESSAGE("Wrong node parameters on edges, u2node.size():"
               <<u2node.size()<<" !=  myNbPonits:"<<myNbPonits);
     {
       MESSAGE("Wrong node parameters on edges, u2node.size():"
               <<u2node.size()<<" !=  myNbPonits:"<<myNbPonits);
@@ -513,9 +513,9 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
 
     // set <constValue>
     if ( isXConst )
 
     // set <constValue>
     if ( isXConst )
-      for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].x = constValue;
+      for ( iPt = 0; iPt < (int)points.size(); ++iPt ) points[ iPt ].x = constValue;
     else
     else
-      for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].y = constValue;
+      for ( iPt = 0; iPt < (int)points.size(); ++iPt ) points[ iPt ].y = constValue;
 
   } // if ( myPoints.empty())
 
 
   } // if ( myPoints.empty())
 
@@ -543,7 +543,7 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::SimulateUVPtStruct(int    nbSeg,
 
     int EdgeIndex = 0;
     double prevNormPar = 0, paramSize = myNormPar[ EdgeIndex ];
 
     int EdgeIndex = 0;
     double prevNormPar = 0, paramSize = myNormPar[ EdgeIndex ];
-    for (int i = 0 ; i < myFalsePoints.size(); ++i ) {
+    for ( size_t i = 0 ; i < myFalsePoints.size(); ++i ) {
       double normPar = double(i) / double(nbSeg);
       UVPtStruct & uvPt = (*points)[i];
       uvPt.node = 0;
       double normPar = double(i) / double(nbSeg);
       UVPtStruct & uvPt = (*points)[i];
       uvPt.node = 0;
@@ -582,7 +582,7 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes(int theEd
   {
     if ( NbEdges() == 0 ) return resultNodes;
 
   {
     if ( NbEdges() == 0 ) return resultNodes;
 
-    SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
+    //SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
     SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
     SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
     fHelper.SetSubShape( myFace );
     SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
     SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
     fHelper.SetSubShape( myFace );
@@ -682,8 +682,8 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes(int theEd
     // Fill the result vector
 
     if ( theEdgeInd < 0 &&
     // Fill the result vector
 
     if ( theEdgeInd < 0 &&
-         u2node.size() != myNbPonits &&
-         u2node.size() != NbPoints( /*update=*/true ))
+         (int) u2node.size() != myNbPonits &&
+         (int) u2node.size() != NbPoints( /*update=*/true ))
     {
       u2node.clear();
     }
     {
       u2node.clear();
     }
@@ -810,7 +810,7 @@ const SMDS_MeshNode* StdMeshers_FaceSide::VertexNode(std::size_t i, bool* isMove
     n = SMESH_Algo::VertexNode( V, sm, myProxyMesh->GetMesh(), /*checkV=*/false );
 
     if (( !n ) &&
     n = SMESH_Algo::VertexNode( V, sm, myProxyMesh->GetMesh(), /*checkV=*/false );
 
     if (( !n ) &&
-        (( i > 0 && i < NbEdges() ) || IsClosed() ))
+        (( i > 0 && (int) i < NbEdges() ) || IsClosed() ))
     {
       iE = SMESH_MesherHelper::WrapIndex( int(i)-1, NbEdges() );
       sm = myProxyMesh->GetMeshDS()->MeshElements( myEdgeID[ iE ]);
     {
       iE = SMESH_MesherHelper::WrapIndex( int(i)-1, NbEdges() );
       sm = myProxyMesh->GetMeshDS()->MeshElements( myEdgeID[ iE ]);
@@ -1051,7 +1051,7 @@ void StdMeshers_FaceSide::dump(const char* msg) const
   if (msg) MESSAGE ( std::endl << msg );
   MESSAGE_BEGIN ("NB EDGES: "<< myEdge.size() );
   MESSAGE_ADD ( "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() );
   if (msg) MESSAGE ( std::endl << msg );
   MESSAGE_BEGIN ("NB EDGES: "<< myEdge.size() );
   MESSAGE_ADD ( "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() );
-  for ( int i=0; i<myEdge.size(); ++i)
+  for ( size_t i = 0; i < myEdge.size(); ++i )
   {
     MESSAGE_ADD ( "\t"<<i+1 );
     MESSAGE_ADD ( "\tEDGE: " );
   {
     MESSAGE_ADD ( "\t"<<i+1 );
     MESSAGE_ADD ( "\tEDGE: " );
@@ -1061,17 +1061,17 @@ void StdMeshers_FaceSide::dump(const char* msg) const
     else {
       TopAbs::Print(myEdge[i].Orientation(),cout)<<" "<<myEdge[i].TShape().operator->()<<endl;
       MESSAGE_ADD ( "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
     else {
       TopAbs::Print(myEdge[i].Orientation(),cout)<<" "<<myEdge[i].TShape().operator->()<<endl;
       MESSAGE_ADD ( "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
-                 << "  V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() );
+                    << "  V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() );
     }
     MESSAGE_ADD ( "\tC2d: ");
     }
     MESSAGE_ADD ( "\tC2d: ");
-    
+
     if (myC2d[i].IsNull()) {
       MESSAGE_ADD ( "NULL" );
     }
     else {
       MESSAGE_ADD ( myC2d[i].operator->() );
     }
     if (myC2d[i].IsNull()) {
       MESSAGE_ADD ( "NULL" );
     }
     else {
       MESSAGE_ADD ( myC2d[i].operator->() );
     }
-      
+
     MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
     MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
   }
     MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
     MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
   }
@@ -1113,7 +1113,7 @@ BRepAdaptor_CompCurve* StdMeshers_FaceSide::GetCurve3d() const
   TopoDS_Wire aWire;
   BRep_Builder aBuilder;
   aBuilder.MakeWire(aWire);
   TopoDS_Wire aWire;
   BRep_Builder aBuilder;
   aBuilder.MakeWire(aWire);
-  for ( int i=0; i<myEdge.size(); ++i )
+  for ( size_t i = 0; i < myEdge.size(); ++i )
     aBuilder.Add( aWire, myEdge[i] );
 
   if ( myEdge.size() == 2 && IsClosed() )
     aBuilder.Add( aWire, myEdge[i] );
 
   if ( myEdge.size() == 2 && IsClosed() )
@@ -1157,7 +1157,7 @@ gp_Pnt2d StdMeshers_FaceSide::Value2d(double U) const
     int i = U * double( myPoints.size()-1 );
     while ( i > 0 && myPoints[ i ].normParam > U )
       --i;
     int i = U * double( myPoints.size()-1 );
     while ( i > 0 && myPoints[ i ].normParam > U )
       --i;
-    while ( i+1 < myPoints.size() && myPoints[ i+1 ].normParam < U )
+    while ( i+1 < (int)myPoints.size() && myPoints[ i+1 ].normParam < U )
       ++i;
     double r = (( U - myPoints[ i ].normParam ) /
                 ( myPoints[ i+1 ].normParam - myPoints[ i ].normParam ));
       ++i;
     double r = (( U - myPoints[ i ].normParam ) /
                 ( myPoints[ i+1 ].normParam - myPoints[ i ].normParam ));
index cd9b520d3de3d237ecc321e17a512e39b0e9a32f..83e19296b14883526b2f8e1a45b81c4cce092a75 100644 (file)
@@ -150,37 +150,37 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
   int intVal;
   double dblVal;
 
   int intVal;
   double dblVal;
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _params.clear();
     _params.reserve( intVal );
     for ( size_t i = 0; i < _params.capacity() && isOK; i++) {
   if (isOK && intVal > 0) {
     _params.clear();
     _params.reserve( intVal );
     for ( size_t i = 0; i < _params.capacity() && isOK; i++) {
-      isOK = (load >> dblVal);
+      isOK = static_cast<bool>(load >> dblVal);
       if ( isOK ) _params.push_back( dblVal );
     }
   }
 
       if ( isOK ) _params.push_back( dblVal );
     }
   }
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _nbsegs.clear();
     _nbsegs.reserve( intVal );
     for ( size_t i = 0; i < _nbsegs.capacity() && isOK; i++) {
   if (isOK && intVal > 0) {
     _nbsegs.clear();
     _nbsegs.reserve( intVal );
     for ( size_t i = 0; i < _nbsegs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _nbsegs.push_back( intVal );
     }
   }
 
       if ( isOK ) _nbsegs.push_back( intVal );
     }
   }
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.clear();
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
   if (isOK && intVal > 0) {
     _edgeIDs.clear();
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
   }
 
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
   }
 
-  isOK = (load >> _objEntry);
+  isOK = static_cast<bool>(load >> _objEntry);
 
   return load;
 }
 
   return load;
 }
index eb50e45a95c3e4cf6f0a97c84d3a4e5aacd049aa..dd77350f756351d7101d9d17dd1ee51c4e7d12b3 100644 (file)
@@ -132,8 +132,8 @@ ostream & StdMeshers_Geometric1D::SaveTo(ostream & save)
 istream & StdMeshers_Geometric1D::LoadFrom(istream & load)
 {
   bool isOK = true;
 istream & StdMeshers_Geometric1D::LoadFrom(istream & load)
 {
   bool isOK = true;
-  isOK = (load >> _begLength);
-  isOK = (load >> _ratio);
+  isOK = static_cast<bool>(load >> _begLength);
+  isOK = static_cast<bool>(load >> _ratio);
 
   if (isOK)
     StdMeshers_Reversible1D::LoadFrom( load );
 
   if (isOK)
     StdMeshers_Reversible1D::LoadFrom( load );
index a31944c644543e7e20ec47dc8a38752613efebb1..340271d55b0a16bacd2dc1362569a8a6c9f97559 100644 (file)
@@ -106,7 +106,7 @@ istream & StdMeshers_LengthFromEdges::LoadFrom(istream & load)
 {
   bool isOK = true;
   int a;
 {
   bool isOK = true;
   int a;
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK) 
     this->_mode = a;
   else 
   if (isOK) 
     this->_mode = a;
   else 
index ea14e8126153fc6026a06aef892f5ce9c8729712..d86e9becb4a8c0d3bfba489670a559e7adc04150 100644 (file)
@@ -148,13 +148,13 @@ istream & StdMeshers_LocalLength::LoadFrom(istream & load)
   bool isOK = true;
   double a;
 
   bool isOK = true;
   double a;
 
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     this->_length = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
   if (isOK)
     this->_length = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     this->_precision = a;
   else
   if (isOK)
     this->_precision = a;
   else
index 726909c3dcc7af0329d65f4cb68d67e9aa2217af..ed2d53fb22910709884be0e4f0db327b4cc1d11c 100644 (file)
@@ -114,7 +114,7 @@ istream & StdMeshers_MaxElementArea::LoadFrom(istream & load)
 {
   bool isOK = true;
   double a;
 {
   bool isOK = true;
   double a;
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK) 
     this->_maxArea = a;
   else 
   if (isOK) 
     this->_maxArea = a;
   else 
index 4ece1400800dae7c94d2ef7fe96fd9cbc2fa70e4..21a4d78a9197b7cbf6386b7a48ad3af8e59127bd 100644 (file)
@@ -116,7 +116,7 @@ istream & StdMeshers_MaxElementVolume::LoadFrom(istream & load)
 {
   bool isOK = true;
   double a;
 {
   bool isOK = true;
   double a;
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     this->_maxVolume = a;
   else 
   if (isOK)
     this->_maxVolume = a;
   else 
index 3d552994013e4496dc2930e2e4e50755237dbded..75ca617c851d32d07ddf69e6b1d2d46aa9c518a2 100644 (file)
@@ -158,20 +158,20 @@ istream & StdMeshers_MaxLength::LoadFrom(istream & load)
   bool isOK = true;
   double a;
 
   bool isOK = true;
   double a;
 
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     _length = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
   if (isOK)
     _length = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     _preestimated = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
   bool pre;
   if (isOK)
     _preestimated = a;
   else
     load.clear(ios::badbit | load.rdstate());
 
   bool pre;
-  isOK = (load >> pre);
+  isOK = static_cast<bool>(load >> pre);
   if ( isOK )
     _preestimation = pre;
   else
   if ( isOK )
     _preestimation = pre;
   else
index d3e0b5277df28cda7d9bb1db6e5793a767477b23..f3fa3104ca933e98e1ec5b204ce37f9cf0af2b26 100644 (file)
@@ -118,7 +118,7 @@ ostream & StdMeshers_NumberOfLayers::SaveTo(ostream & save)
 istream & StdMeshers_NumberOfLayers::LoadFrom(istream & load)
 {
   bool isOK = true;
 istream & StdMeshers_NumberOfLayers::LoadFrom(istream & load)
 {
   bool isOK = true;
-  isOK = (load >> _nbLayers);
+  isOK = static_cast<bool>(load >> _nbLayers);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   return load;
index 8d262e36f17595715ef7aeaff76556baf7022dda..2fec858ef786ca860ef903aefcfde26ddd466c7d 100644 (file)
@@ -548,7 +548,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
   int a;
 
   // read number of segments
   int a;
 
   // read number of segments
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     _numberOfSegments = a;
   else
   if (isOK)
     _numberOfSegments = a;
   else
@@ -561,7 +561,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
   //    (nb.segments, distr.type, some other params.),
   //    we wait here the ditribution type, which is integer
   double scale_factor;
   //    (nb.segments, distr.type, some other params.),
   //    we wait here the ditribution type, which is integer
   double scale_factor;
-  isOK = (load >> scale_factor);
+  isOK = static_cast<bool>(load >> scale_factor);
   a = (int)scale_factor;
 
   // try to interprete ditribution type,
   a = (int)scale_factor;
 
   // try to interprete ditribution type,
@@ -582,7 +582,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
   {
   case DT_Scale:
     {
   {
   case DT_Scale:
     {
-      isOK = (load >> b);
+      isOK = static_cast<bool>(load >> b);
       if (isOK)
         _scaleFactor = b;
       else
       if (isOK)
         _scaleFactor = b;
       else
@@ -596,13 +596,13 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
     break;
   case DT_TabFunc:
     {
     break;
   case DT_TabFunc:
     {
-      isOK = (load >> a);
+      isOK = static_cast<bool>(load >> a);
       if (isOK)
       {
         _table.resize(a, 0.);
         for ( size_t i=0; i < _table.size(); i++ )
         {
       if (isOK)
       {
         _table.resize(a, 0.);
         for ( size_t i=0; i < _table.size(); i++ )
         {
-          isOK = (load >> b);
+          isOK = static_cast<bool>(load >> b);
           if (isOK)
             _table[i] = b;
           else
           if (isOK)
             _table[i] = b;
           else
@@ -621,7 +621,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
   case DT_ExprFunc:
     {
       string str;
   case DT_ExprFunc:
     {
       string str;
-      isOK = (load >> str);
+      isOK = static_cast<bool>(load >> str);
       if (isOK)
         _func = str;
       else
       if (isOK)
         _func = str;
       else
@@ -640,7 +640,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
 
   if (_distrType == DT_TabFunc || _distrType == DT_ExprFunc)
   {
 
   if (_distrType == DT_TabFunc || _distrType == DT_ExprFunc)
   {
-    isOK = (load >> a);
+    isOK = static_cast<bool>(load >> a);
     if (isOK)
       _convMode = a;
     else
     if (isOK)
       _convMode = a;
     else
@@ -649,14 +649,14 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load)
 
   // load reversed edges IDs
   int intVal;
 
   // load reversed edges IDs
   int intVal;
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if ( isOK && _distrType != DT_Regular && intVal > 0 ) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
   if ( isOK && _distrType != DT_Regular && intVal > 0 ) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
   }
 
   return load;
index 3c3abe38574871c2401e17bfe9820f3787d71bf6..f4c519ae7a63df1b8f2729542efeb14219df71b9 100644 (file)
@@ -33,9 +33,9 @@
 
 #include <IntAna_IntConicQuad.hxx>
 #include <IntAna_Quadric.hxx>
 
 #include <IntAna_IntConicQuad.hxx>
 #include <IntAna_Quadric.hxx>
-#include <TColgp_HArray1OfPnt.hxx>
-#include <TColgp_HArray1OfVec.hxx>
-#include <TColgp_HSequenceOfPnt.hxx>
+#include <TColgp_Array1OfPnt.hxx>
+#include <TColgp_Array1OfVec.hxx>
+#include <TColgp_SequenceOfPnt.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <gp_Lin.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <gp_Lin.hxx>
@@ -495,26 +495,23 @@ static bool HasIntersection3(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
 //=======================================================================
 
 static bool HasIntersection(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
 //=======================================================================
 
 static bool HasIntersection(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
-                            Handle(TColgp_HSequenceOfPnt)& aContour)
+                            TColgp_SequenceOfPnt& aContour)
 {
 {
-  if(aContour->Length()==3) {
-    return HasIntersection3( P, PC, Pint, aContour->Value(1),
-                             aContour->Value(2), aContour->Value(3) );
+  if ( aContour.Length() == 3 ) {
+    return HasIntersection3( P, PC, Pint, aContour(1), aContour(2), aContour(3) );
   }
   else {
     bool check = false;
   }
   else {
     bool check = false;
-    if( (aContour->Value(1).Distance(aContour->Value(2)) > 1.e-6) &&
-        (aContour->Value(1).Distance(aContour->Value(3)) > 1.e-6) &&
-        (aContour->Value(2).Distance(aContour->Value(3)) > 1.e-6) ) {
-      check = HasIntersection3( P, PC, Pint, aContour->Value(1),
-                                aContour->Value(2), aContour->Value(3) );
+    if( (aContour(1).Distance(aContour(2)) > 1.e-6) &&
+        (aContour(1).Distance(aContour(3)) > 1.e-6) &&
+        (aContour(2).Distance(aContour(3)) > 1.e-6) ) {
+      check = HasIntersection3( P, PC, Pint, aContour(1), aContour(2), aContour(3) );
     }
     if(check) return true;
     }
     if(check) return true;
-    if( (aContour->Value(1).Distance(aContour->Value(4)) > 1.e-6) &&
-        (aContour->Value(1).Distance(aContour->Value(3)) > 1.e-6) &&
-        (aContour->Value(4).Distance(aContour->Value(3)) > 1.e-6) ) {
-      check = HasIntersection3( P, PC, Pint, aContour->Value(1),
-                                aContour->Value(3), aContour->Value(4) );
+    if( (aContour(1).Distance(aContour(4)) > 1.e-6) &&
+        (aContour(1).Distance(aContour(3)) > 1.e-6) &&
+        (aContour(4).Distance(aContour(3)) > 1.e-6) ) {
+      check = HasIntersection3( P, PC, Pint, aContour(1), aContour(3), aContour(4) );
     }
     if(check) return true;
   }
     }
     if(check) return true;
   }
@@ -546,24 +543,23 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection (const gp_Pnt&       P,
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *aMesh.GetMeshDS() );
   SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
 
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *aMesh.GetMeshDS() );
   SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
 
-  //SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
-  //cout<<"    CheckIntersection: meshDS->NbFaces() = "<<meshDS->NbFaces()<<endl;
   bool    res = false;
   bool    res = false;
-  double dist = RealLast(); // find intersection closest to the segment
+  double dist = RealLast(); // find intersection closest to PC
   gp_Pnt Pres;
 
   gp_Ax1 line( P, gp_Vec(P,PC));
   vector< const SMDS_MeshElement* > suspectElems;
   searcher->GetElementsNearLine( line, SMDSAbs_Face, suspectElems);
 
   gp_Pnt Pres;
 
   gp_Ax1 line( P, gp_Vec(P,PC));
   vector< const SMDS_MeshElement* > suspectElems;
   searcher->GetElementsNearLine( line, SMDSAbs_Face, suspectElems);
 
+  TColgp_SequenceOfPnt aContour;
   for ( size_t iF = 0; iF < suspectElems.size(); ++iF )
   {
     const SMDS_MeshElement* face = suspectElems[iF];
     if ( face == NotCheckedFace ) continue;
   for ( size_t iF = 0; iF < suspectElems.size(); ++iF )
   {
     const SMDS_MeshElement* face = suspectElems[iF];
     if ( face == NotCheckedFace ) continue;
-    Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
+    aContour.Clear();
     for ( int i = 0; i < face->NbCornerNodes(); ++i )
     for ( int i = 0; i < face->NbCornerNodes(); ++i )
-      aContour->Append( SMESH_TNodeXYZ( face->GetNode(i) ));
-    if( HasIntersection(P, PC, Pres, aContour) ) {
+      aContour.Append( SMESH_TNodeXYZ( face->GetNode(i) ));
+    if ( HasIntersection(P, PC, Pres, aContour)) {
       res = true;
       double tmp = PC.Distance(Pres);
       if ( tmp < dist ) {
       res = true;
       double tmp = PC.Distance(Pres);
       if ( tmp < dist ) {
@@ -591,8 +587,8 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection (const gp_Pnt&       P,
 //================================================================================
 
 int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face,
 //================================================================================
 
 int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face,
-                                              Handle(TColgp_HArray1OfPnt)&  PN,
-                                              Handle(TColgp_HArray1OfVec)&  VN,
+                                              TColgp_Array1OfPnt&           PN,
+                                              TColgp_Array1OfVec&           VN,
                                               vector<const SMDS_MeshNode*>& FNodes,
                                               gp_Pnt&                       PC,
                                               gp_Vec&                       VNorm,
                                               vector<const SMDS_MeshNode*>& FNodes,
                                               gp_Pnt&                       PC,
                                               gp_Vec&                       VNorm,
@@ -608,7 +604,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face
   for ( i = 0; i < 4; ++i )
   {
     gp_XYZ p = SMESH_TNodeXYZ( FNodes[i] = face->GetNode(i) );
   for ( i = 0; i < 4; ++i )
   {
     gp_XYZ p = SMESH_TNodeXYZ( FNodes[i] = face->GetNode(i) );
-    PN->SetValue( i+1, p );
+    PN.SetValue( i+1, p );
     xyzC += p;
   }
   PC = xyzC/4;
     xyzC += p;
   }
   PC = xyzC/4;
@@ -619,7 +615,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face
   for(i=1; i<4; i++) {
     j = i+1;
     for(; j<=4; j++) {
   for(i=1; i<4; i++) {
     j = i+1;
     for(; j<=4; j++) {
-      if( PN->Value(i).Distance(PN->Value(j)) < 1.e-6 )
+      if( PN(i).Distance(PN(j)) < 1.e-6 )
         break;
     }
     if(j<=4) break;
         break;
     }
     if(j<=4) break;
@@ -630,7 +626,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face
   if(i<4) {
     //cout<<"find degeneration"<<endl;
     hasdeg = true;
   if(i<4) {
     //cout<<"find degeneration"<<endl;
     hasdeg = true;
-    gp_Pnt Pdeg = PN->Value(i);
+    gp_Pnt Pdeg = PN(i);
 
     list< const SMDS_MeshNode* >::iterator itdg = myDegNodes.begin();
     const SMDS_MeshNode* DegNode = 0;
 
     list< const SMDS_MeshNode* >::iterator itdg = myDegNodes.begin();
     const SMDS_MeshNode* DegNode = 0;
@@ -651,24 +647,24 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face
       FNodes[i-1] = DegNode;
     }
     for(i=j; i<4; i++) {
       FNodes[i-1] = DegNode;
     }
     for(i=j; i<4; i++) {
-      PN->SetValue(i,PN->Value(i+1));
+      PN.SetValue(i,PN.Value(i+1));
       FNodes[i-1] = FNodes[i];
     }
     nbp = 3;
   }
 
       FNodes[i-1] = FNodes[i];
     }
     nbp = 3;
   }
 
-  PN->SetValue(nbp+1,PN->Value(1));
+  PN.SetValue(nbp+1,PN(1));
   FNodes[nbp] = FNodes[0];
   // find normal direction
   FNodes[nbp] = FNodes[0];
   // find normal direction
-  gp_Vec V1(PC,PN->Value(nbp));
-  gp_Vec V2(PC,PN->Value(1));
+  gp_Vec V1(PC,PN(nbp));
+  gp_Vec V2(PC,PN(1));
   VNorm = V1.Crossed(V2);
   VNorm = V1.Crossed(V2);
-  VN->SetValue(nbp,VNorm);
+  VN.SetValue(nbp,VNorm);
   for(i=1; i<nbp; i++) {
   for(i=1; i<nbp; i++) {
-    V1 = gp_Vec(PC,PN->Value(i));
-    V2 = gp_Vec(PC,PN->Value(i+1));
+    V1 = gp_Vec(PC,PN(i));
+    V2 = gp_Vec(PC,PN(i+1));
     gp_Vec Vtmp = V1.Crossed(V2);
     gp_Vec Vtmp = V1.Crossed(V2);
-    VN->SetValue(i,Vtmp);
+    VN.SetValue(i,Vtmp);
     VNorm += Vtmp;
   }
 
     VNorm += Vtmp;
   }
 
@@ -736,8 +732,8 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh&         aMesh,
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
 
   const SMESHDS_SubMesh * aSubMeshDSFace;
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
 
   const SMESHDS_SubMesh * aSubMeshDSFace;
-  Handle(TColgp_HArray1OfPnt) PN = new TColgp_HArray1OfPnt(1,5);
-  Handle(TColgp_HArray1OfVec) VN = new TColgp_HArray1OfVec(1,4);
+  TColgp_Array1OfPnt PN(1,5);
+  TColgp_Array1OfVec VN(1,4);
   vector<const SMDS_MeshNode*> FNodes(5);
   gp_Pnt PC;
   gp_Vec VNorm;
   vector<const SMDS_MeshNode*> FNodes(5);
   gp_Pnt PC;
   gp_Vec VNorm;
@@ -796,9 +792,9 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh&         aMesh,
             for(; i<=4; i++) {
               gp_Pnt Pbest;
               if(!isRev)
             for(; i<=4; i++) {
               gp_Pnt Pbest;
               if(!isRev)
-                Pbest = FindBestPoint(PN->Value(i), PN->Value(i+1), PC, VN->Value(i).Reversed());
+                Pbest = FindBestPoint(PN(i), PN(i+1), PC, VN(i).Reversed());
               else
               else
-                Pbest = FindBestPoint(PN->Value(i), PN->Value(i+1), PC, VN->Value(i));
+                Pbest = FindBestPoint(PN(i), PN(i+1), PC, VN(i));
               xc += Pbest.X();
               yc += Pbest.Y();
               zc += Pbest.Z();
               xc += Pbest.X();
               yc += Pbest.Y();
               zc += Pbest.Z();
@@ -807,31 +803,21 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh&         aMesh,
 
             // check PCbest
             double height = PCbest.Distance(PC);
 
             // check PCbest
             double height = PCbest.Distance(PC);
-            if(height<1.e-6) {
+            if ( height < 1.e-6 ) {
               // create new PCbest using a bit shift along VNorm
               PCbest = PC.XYZ() + VNorm.XYZ() * 0.001;
             }
             else {
               // check possible intersection with other faces
               gp_Pnt Pint;
               // create new PCbest using a bit shift along VNorm
               PCbest = PC.XYZ() + VNorm.XYZ() * 0.001;
             }
             else {
               // check possible intersection with other faces
               gp_Pnt Pint;
-              bool check = CheckIntersection(PCbest, PC, Pint, aMesh, aShape, face);
-              if(check) {
-                //cout<<"--PC("<<PC.X()<<","<<PC.Y()<<","<<PC.Z()<<")"<<endl;
-                //cout<<"  PCbest("<<PCbest.X()<<","<<PCbest.Y()<<","<<PCbest.Z()<<")"<<endl;
+              gp_Vec VB(PC,PCbest);
+              gp_Pnt PCbestTmp = PC.XYZ() + VB.XYZ() * 3.0;
+              bool hasInters = CheckIntersection(PCbestTmp, PC, Pint, aMesh, aShape, face);
+              if ( hasInters ) {
                 double dist = PC.Distance(Pint)/3.;
                 double dist = PC.Distance(Pint)/3.;
-                gp_Dir aDir(gp_Vec(PC,PCbest));
-                PCbest = PC.XYZ() + aDir.XYZ() * dist;
-              }
-              else {
-                gp_Vec VB(PC,PCbest);
-                gp_Pnt PCbestTmp = PC.XYZ() + VB.XYZ() * 3.0;
-                check = CheckIntersection(PCbestTmp, PC, Pint, aMesh, aShape, face);
-                if(check) {
-                  double dist = PC.Distance(Pint)/3.;
-                  if(dist<height) {
-                    gp_Dir aDir(gp_Vec(PC,PCbest));
-                    PCbest = PC.XYZ() + aDir.XYZ() * dist;
-                  }
+                if ( dist < height ) {
+                  gp_Dir aDir( VB );
+                  PCbest = PC.XYZ() + aDir.XYZ() * dist;
                 }
               }
             }
                 }
               }
             }
@@ -945,15 +931,17 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
   SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
 
     myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
   SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
 
+  TColgp_Array1OfPnt PN(1,5);
+  TColgp_Array1OfVec VN(1,4);
+  vector<const SMDS_MeshNode*> FNodes(5);
+  TColgp_SequenceOfPnt aContour;
+
   SMDS_FaceIteratorPtr fIt = meshDS->facesIterator(/*idInceasingOrder=*/true);
   while( fIt->more())
   {
     const SMDS_MeshElement* face = fIt->next();
     if ( !face ) continue;
     // retrieve needed information about a face
   SMDS_FaceIteratorPtr fIt = meshDS->facesIterator(/*idInceasingOrder=*/true);
   while( fIt->more())
   {
     const SMDS_MeshElement* face = fIt->next();
     if ( !face ) continue;
     // retrieve needed information about a face
-    Handle(TColgp_HArray1OfPnt) PN = new TColgp_HArray1OfPnt(1,5);
-    Handle(TColgp_HArray1OfVec) VN = new TColgp_HArray1OfVec(1,4);
-    vector<const SMDS_MeshNode*> FNodes(5);
     gp_Pnt PC;
     gp_Vec VNorm;
     const SMDS_MeshElement* volumes[2];
     gp_Pnt PC;
     gp_Vec VNorm;
     const SMDS_MeshElement* volumes[2];
@@ -970,7 +958,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
       SMDS_MeshFace* NewFace;
 
       // check orientation
       SMDS_MeshFace* NewFace;
 
       // check orientation
-      double tmp = PN->Value(1).Distance(PN->Value(2)) + PN->Value(2).Distance(PN->Value(3));
+      double tmp = PN(1).Distance(PN(2)) + PN(2).Distance(PN(3));
       // far points in VNorm direction
       gp_Pnt Ptmp1 = PC.XYZ() + VNorm.XYZ() * tmp * 1.e6;
       gp_Pnt Ptmp2 = PC.XYZ() - VNorm.XYZ() * tmp * 1.e6;
       // far points in VNorm direction
       gp_Pnt Ptmp1 = PC.XYZ() + VNorm.XYZ() * tmp * 1.e6;
       gp_Pnt Ptmp2 = PC.XYZ() - VNorm.XYZ() * tmp * 1.e6;
@@ -989,9 +977,9 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
       for ( size_t iF = 0; iF < suspectElems.size(); ++iF ) {
         const SMDS_MeshElement* F = suspectElems[iF];
         if ( F == face ) continue;
       for ( size_t iF = 0; iF < suspectElems.size(); ++iF ) {
         const SMDS_MeshElement* F = suspectElems[iF];
         if ( F == face ) continue;
-        Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
+        aContour.Clear();
         for ( int i = 0; i < 4; ++i )
         for ( int i = 0; i < 4; ++i )
-          aContour->Append( SMESH_TNodeXYZ( F->GetNode(i) ));
+          aContour.Append( SMESH_TNodeXYZ( F->GetNode(i) ));
         gp_Pnt PPP;
         if ( !volumes[0] && HasIntersection( Ptmp1, PC, PPP, aContour )) {
           IsOK1 = true;
         gp_Pnt PPP;
         if ( !volumes[0] && HasIntersection( Ptmp1, PC, PPP, aContour )) {
           IsOK1 = true;
@@ -1045,7 +1033,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
     gp_XYZ PCbest(0., 0., 0.); // pyramid peak
     int i = 1;
     for ( ; i <= 4; i++ ) {
     gp_XYZ PCbest(0., 0., 0.); // pyramid peak
     int i = 1;
     for ( ; i <= 4; i++ ) {
-      gp_Pnt Pbest = FindBestPoint(PN->Value(i), PN->Value(i+1), PC, VN->Value(i));
+      gp_Pnt Pbest = FindBestPoint(PN(i), PN(i+1), PC, VN(i));
       PCbest += Pbest.XYZ();
     }
     PCbest /= 4;
       PCbest += Pbest.XYZ();
     }
     PCbest /= 4;
@@ -1061,7 +1049,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
 
     // Restrict pyramid height by intersection with other faces
     gp_Vec tmpDir(PC,PCbest); tmpDir.Normalize();
 
     // Restrict pyramid height by intersection with other faces
     gp_Vec tmpDir(PC,PCbest); tmpDir.Normalize();
-    double tmp = PN->Value(1).Distance(PN->Value(3)) + PN->Value(2).Distance(PN->Value(4));
+    double tmp = PN(1).Distance(PN(3)) + PN(2).Distance(PN(4));
     // far points: in (PC, PCbest) direction and vice-versa
     gp_Pnt farPnt[2] = { PC.XYZ() + tmpDir.XYZ() * tmp * 1.e6,
                          PC.XYZ() - tmpDir.XYZ() * tmp * 1.e6 };
     // far points: in (PC, PCbest) direction and vice-versa
     gp_Pnt farPnt[2] = { PC.XYZ() + tmpDir.XYZ() * tmp * 1.e6,
                          PC.XYZ() - tmpDir.XYZ() * tmp * 1.e6 };
@@ -1078,10 +1066,10 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
     {
       const SMDS_MeshElement* F = suspectElems[iF];
       if ( F == face ) continue;
     {
       const SMDS_MeshElement* F = suspectElems[iF];
       if ( F == face ) continue;
-      Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
-      int nbN = F->NbNodes() / ( F->IsQuadratic() ? 2 : 1 );
+      aContour.Clear();
+      int nbN = F->NbCornerNodes();
       for ( i = 0; i < nbN; ++i )
       for ( i = 0; i < nbN; ++i )
-        aContour->Append( SMESH_TNodeXYZ( F->GetNode(i) ));
+        aContour.Append( SMESH_TNodeXYZ( F->GetNode(i) ));
       gp_Pnt intP;
       for ( int isRev = 0; isRev < 2; ++isRev )
       {
       gp_Pnt intP;
       for ( int isRev = 0; isRev < 2; ++isRev )
       {
index c1082f7ce8625b481498130842aef10f03e191a1..44470b8e94997203b5435641dda3b5bb8c679e13 100644 (file)
@@ -32,8 +32,8 @@ class SMESH_ElementSearcher;
 class SMDS_MeshElement;
 class SMDS_MeshNode;
 class SMDS_MeshFace;
 class SMDS_MeshElement;
 class SMDS_MeshNode;
 class SMDS_MeshFace;
-class Handle_TColgp_HArray1OfPnt;
-class Handle_TColgp_HArray1OfVec;
+class TColgp_Array1OfPnt;
+class TColgp_Array1OfVec;
 class gp_Pnt;
 class gp_Vec;
 
 class gp_Pnt;
 class gp_Vec;
 
@@ -65,8 +65,8 @@ public:
 protected:
 
   int Preparation(const SMDS_MeshElement* face,
 protected:
 
   int Preparation(const SMDS_MeshElement* face,
-                  Handle_TColgp_HArray1OfPnt& PN,
-                  Handle_TColgp_HArray1OfVec& VN,
+                  TColgp_Array1OfPnt& PN,
+                  TColgp_Array1OfVec& VN,
                   std::vector<const SMDS_MeshNode*>& FNodes,
                   gp_Pnt& PC, gp_Vec& VNorm,
                   const SMDS_MeshElement** volumes=0);
                   std::vector<const SMDS_MeshNode*>& FNodes,
                   gp_Pnt& PC, gp_Vec& VNorm,
                   const SMDS_MeshElement** volumes=0);
index 708b9a2fabdf3777285dd0baf4f0da7d7afa350a..9ba7ec23a19b8d072bea83c27d83a4c49d1fc8ea 100644 (file)
@@ -153,16 +153,16 @@ ostream & StdMeshers_QuadrangleParams::SaveTo(ostream & save)
 istream & StdMeshers_QuadrangleParams::LoadFrom(istream & load)
 {
   bool isOK = true;
 istream & StdMeshers_QuadrangleParams::LoadFrom(istream & load)
 {
   bool isOK = true;
-  isOK = (load >> _triaVertexID);
+  isOK = static_cast<bool>(load >> _triaVertexID);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> _objEntry);
+  isOK = static_cast<bool>(load >> _objEntry);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
   int type;
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
   int type;
-  isOK = (load >> type);
+  isOK = static_cast<bool>(load >> type);
   if (isOK)
     _quadType = StdMeshers_QuadType(type);
 
   if (isOK)
     _quadType = StdMeshers_QuadType(type);
 
index a3bf670cbdc644d54a26b46a6a824621ec5326bd..e55edf26aff59ab6801d8cfde585549c1099f8a4 100644 (file)
@@ -1781,10 +1781,10 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
   //       0  bottom  1
 
 
   //       0  bottom  1
 
 
-  const int bfrom = quad->side[0].from;
-  const int rfrom = quad->side[1].from;
+  //const int bfrom = quad->side[0].from;
+  //const int rfrom = quad->side[1].from;
   const int tfrom = quad->side[2].from;
   const int tfrom = quad->side[2].from;
-  const int lfrom = quad->side[3].from;
+  //const int lfrom = quad->side[3].from;
   {
     const vector<UVPtStruct>& uv_eb_vec = quad->side[0].GetUVPtStruct(true,0);
     const vector<UVPtStruct>& uv_er_vec = quad->side[1].GetUVPtStruct(false,1);
   {
     const vector<UVPtStruct>& uv_eb_vec = quad->side[0].GetUVPtStruct(true,0);
     const vector<UVPtStruct>& uv_er_vec = quad->side[1].GetUVPtStruct(false,1);
@@ -1925,10 +1925,10 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
 
     } // if ( dv != 0 && dh != 0 )
 
 
     } // if ( dv != 0 && dh != 0 )
 
-    const int db = quad->side[0].IsReversed() ? -1 : +1;
-    const int dr = quad->side[1].IsReversed() ? -1 : +1;
+    //const int db = quad->side[0].IsReversed() ? -1 : +1;
+    //const int dr = quad->side[1].IsReversed() ? -1 : +1;
     const int dt = quad->side[2].IsReversed() ? -1 : +1;
     const int dt = quad->side[2].IsReversed() ? -1 : +1;
-    const int dl = quad->side[3].IsReversed() ? -1 : +1;
+    //const int dl = quad->side[3].IsReversed() ? -1 : +1;
 
     // Case dv == 0,  here possibly myQuadList.size() > 1
     //
 
     // Case dv == 0,  here possibly myQuadList.size() > 1
     //
@@ -2970,7 +2970,8 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
     const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
     const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
     const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
     const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
-    if (uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl)
+    if ((int) uv_eb.size() != nb || (int) uv_er.size() != nr ||
+        (int) uv_et.size() != nt || (int) uv_el.size() != nl)
       return error(COMPERR_BAD_INPUT_MESH);
 
     // arrays for normalized params
       return error(COMPERR_BAD_INPUT_MESH);
 
     // arrays for normalized params
@@ -3283,7 +3284,8 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
     const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
     const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
     const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
     const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
-    if (uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl)
+    if ((int) uv_eb.size() != nb || (int) uv_er.size() != nr ||
+        (int) uv_et.size() != nt || (int) uv_el.size() != nl)
       return error(COMPERR_BAD_INPUT_MESH);
 
     gp_UV uv[ UV_SIZE ];
       return error(COMPERR_BAD_INPUT_MESH);
 
     gp_UV uv[ UV_SIZE ];
@@ -4337,7 +4339,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
 
   // check if there are possible variations in choosing corners
   bool haveVariants = false;
 
   // check if there are possible variations in choosing corners
   bool haveVariants = false;
-  if ( vertexByAngle.size() > nbCorners )
+  if ((int) vertexByAngle.size() > nbCorners )
   {
     double lostAngle = a2v->first;
     double lastAngle = ( --a2v, a2v->first );
   {
     double lostAngle = a2v->first;
     double lastAngle = ( --a2v, a2v->first );
@@ -4345,7 +4347,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
   }
 
   const double angleTol = 5.* M_PI/180;
   }
 
   const double angleTol = 5.* M_PI/180;
-  myCheckOri = ( vertexByAngle.size() > nbCorners ||
+  myCheckOri = ( (int)vertexByAngle.size() > nbCorners ||
                  vertexByAngle.begin()->first < angleTol );
 
   // make theWire begin from a corner vertex or triaVertex
                  vertexByAngle.begin()->first < angleTol );
 
   // make theWire begin from a corner vertex or triaVertex
@@ -4475,7 +4477,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
       {
         // select two halfDivider's as corners
         TGeoIndex hd1, hd2 = -1;
       {
         // select two halfDivider's as corners
         TGeoIndex hd1, hd2 = -1;
-        int iC2;
+        size_t iC2;
         for ( iC2 = 0; iC2 < cornerInd.size() && hd2 < 0; ++iC2 )
         {
           hd1 = cornerInd[ iC2 ];
         for ( iC2 = 0; iC2 < cornerInd.size() && hd2 < 0; ++iC2 )
         {
           hd1 = cornerInd[ iC2 ];
@@ -4521,10 +4523,10 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
         vector< double > accuLength;
         double totalLen = 0;
         vector< TGeoIndex > evVec( equVerts.begin(), equVerts.end() );
         vector< double > accuLength;
         double totalLen = 0;
         vector< TGeoIndex > evVec( equVerts.begin(), equVerts.end() );
-        int          iEV = 0;
+        size_t      iEV = 0;
         TGeoIndex    iE = cornerInd[ helper.WrapIndex( iC - nbC[0] - 1, cornerInd.size() )];
         TGeoIndex iEEnd = cornerInd[ helper.WrapIndex( iC + nbC[1] + 1, cornerInd.size() )];
         TGeoIndex    iE = cornerInd[ helper.WrapIndex( iC - nbC[0] - 1, cornerInd.size() )];
         TGeoIndex iEEnd = cornerInd[ helper.WrapIndex( iC + nbC[1] + 1, cornerInd.size() )];
-        while ( accuLength.size() < nbEqualV + int( !allCornersSame ) )
+        while ((int) accuLength.size() < nbEqualV + int( !allCornersSame ) )
         {
           // accumulate length of edges before iEV-th equal vertex
           accuLength.push_back( totalLen );
         {
           // accumulate length of edges before iEV-th equal vertex
           accuLength.push_back( totalLen );
@@ -4780,8 +4782,6 @@ bool StdMeshers_Quadrangle_2D::addEnforcedNodes()
       quadsBySide[ (*quadIt)->side[iSide] ].push_back( *quadIt );
     }
 
       quadsBySide[ (*quadIt)->side[iSide] ].push_back( *quadIt );
     }
 
-  SMESH_Mesh*          mesh = myHelper->GetMesh();
-  SMESHDS_Mesh*      meshDS = myHelper->GetMeshDS();
   const TopoDS_Face&   face = TopoDS::Face( myHelper->GetSubShape() );
   Handle(Geom_Surface) surf = BRep_Tool::Surface( face );
 
   const TopoDS_Face&   face = TopoDS::Face( myHelper->GetSubShape() );
   Handle(Geom_Surface) surf = BRep_Tool::Surface( face );
 
@@ -4961,8 +4961,8 @@ bool StdMeshers_Quadrangle_2D::addEnforcedNodes()
           continue;
         const vector<UVPtStruct>& oGrid = side.contacts[iC].other_side->grid->GetUVPtStruct();
         const UVPtStruct&         uvPt  = points[ side.contacts[iC].point ];
           continue;
         const vector<UVPtStruct>& oGrid = side.contacts[iC].other_side->grid->GetUVPtStruct();
         const UVPtStruct&         uvPt  = points[ side.contacts[iC].point ];
-        if ( side.contacts[iC].other_point >= oGrid .size() ||
-             side.contacts[iC].point       >= points.size() )
+        if ( side.contacts[iC].other_point >= (int) oGrid .size() ||
+             side.contacts[iC].point       >= (int) points.size() )
           throw SALOME_Exception( "StdMeshers_Quadrangle_2D::addEnforcedNodes(): wrong contact" );
         if ( oGrid[ side.contacts[iC].other_point ].node )
           (( UVPtStruct& ) uvPt).node = oGrid[ side.contacts[iC].other_point ].node;
           throw SALOME_Exception( "StdMeshers_Quadrangle_2D::addEnforcedNodes(): wrong contact" );
         if ( oGrid[ side.contacts[iC].other_point ].node )
           (( UVPtStruct& ) uvPt).node = oGrid[ side.contacts[iC].other_point ].node;
@@ -5118,9 +5118,9 @@ void StdMeshers_Quadrangle_2D::updateSideUV( FaceQuadStruct::Side&  side,
     return;
   }
 
     return;
   }
 
-  const int iFrom    = Min ( iForced, *iNext );
-  const int iTo      = Max ( iForced, *iNext ) + 1;
-  const int sideSize = iTo - iFrom;
+  const int    iFrom    = Min ( iForced, *iNext );
+  const int    iTo      = Max ( iForced, *iNext ) + 1;
+  const size_t sideSize = iTo - iFrom;
 
   vector<UVPtStruct> points[4]; // side points of a temporary quad
 
 
   vector<UVPtStruct> points[4]; // side points of a temporary quad
 
@@ -5130,7 +5130,7 @@ void StdMeshers_Quadrangle_2D::updateSideUV( FaceQuadStruct::Side&  side,
   for ( int is2nd = 0; is2nd < 2; ++is2nd )
   {
     points[ is2nd ].reserve( sideSize );
   for ( int is2nd = 0; is2nd < 2; ++is2nd )
   {
     points[ is2nd ].reserve( sideSize );
-    int nbLoops = 0;
+    size_t nbLoops = 0;
     while ( points[is2nd].size() < sideSize )
     {
       int iCur = iFrom + points[is2nd].size() - int( !points[is2nd].empty() );
     while ( points[is2nd].size() < sideSize )
     {
       int iCur = iFrom + points[is2nd].size() - int( !points[is2nd].empty() );
@@ -5624,8 +5624,8 @@ bool FaceQuadStruct::Side::IsForced( int nodeIndex ) const
 
 void FaceQuadStruct::Side::AddContact( int ip, Side* side, int iop )
 {
 
 void FaceQuadStruct::Side::AddContact( int ip, Side* side, int iop )
 {
-  if ( ip  >= GetUVPtStruct().size()      ||
-       iop >= side->GetUVPtStruct().size() )
+  if ( ip  >= (int) GetUVPtStruct().size()      ||
+       iop >= (int) side->GetUVPtStruct().size() )
     throw SALOME_Exception( "FaceQuadStruct::Side::AddContact(): wrong point" );
   if ( ip < from || ip >= to )
     return;
     throw SALOME_Exception( "FaceQuadStruct::Side::AddContact(): wrong point" );
   if ( ip < from || ip >= to )
     return;
index e9aab2b2953c5c9b5c73083bb234042592aa457f..b861f3701c87d909fc01924f1445e02bc75b9e38 100644 (file)
@@ -537,8 +537,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     gp_Vec2d aVec2d(PC,p2dV);
     Nodes1.resize( myLayerPositions.size()+1 );
     Nodes2.resize( myLayerPositions.size()+1 );
     gp_Vec2d aVec2d(PC,p2dV);
     Nodes1.resize( myLayerPositions.size()+1 );
     Nodes2.resize( myLayerPositions.size()+1 );
-    int i = 0;
-    for(; i<myLayerPositions.size(); i++) {
+    size_t i = 0;
+    for ( ; i < myLayerPositions.size(); i++ ) {
       gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                 P0.Y() + aVec.Y()*myLayerPositions[i],
                 P0.Z() + aVec.Z()*myLayerPositions[i] );
       gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                 P0.Y() + aVec.Y()*myLayerPositions[i],
                 P0.Z() + aVec.Z()*myLayerPositions[i] );
@@ -648,7 +648,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       meshDS->SetNodeOnEdge(NC, edgeID, cp);
       Nodes1.resize( myLayerPositions.size()+1 );
       Nodes2.resize( myLayerPositions.size()+1 );
       meshDS->SetNodeOnEdge(NC, edgeID, cp);
       Nodes1.resize( myLayerPositions.size()+1 );
       Nodes2.resize( myLayerPositions.size()+1 );
-      int i = 0;
+      size_t i = 0;
       for(; i<myLayerPositions.size(); i++) {
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
       for(; i<myLayerPositions.size(); i++) {
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
@@ -774,8 +774,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       bool nodesFromP0ToP1 = ( theNodes.rbegin()->second == NF );
       NC = const_cast<SMDS_MeshNode*>
         ( nodesFromP0ToP1 ? theNodes.begin()->second : theNodes.rbegin()->second );
       bool nodesFromP0ToP1 = ( theNodes.rbegin()->second == NF );
       NC = const_cast<SMDS_MeshNode*>
         ( nodesFromP0ToP1 ? theNodes.begin()->second : theNodes.rbegin()->second );
-      int i = 0, ir = Nodes1.size()-1;
-      int * pi = nodesFromP0ToP1 ? &i : &ir;
+      size_t i = 0, ir = Nodes1.size()-1;
+      size_t * pi = nodesFromP0ToP1 ? &i : &ir;
       itn = theNodes.begin();
       if ( nodesFromP0ToP1 ) ++itn;
       for ( ; i < Nodes1.size(); ++i, --ir, ++itn )
       itn = theNodes.begin();
       if ( nodesFromP0ToP1 ) ++itn;
       for ( ; i < Nodes1.size(); ++i, --ir, ++itn )
@@ -817,8 +817,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         meshDS->SetNodeOnVertex(NC, vertID);
       }
       double dp = lp-fp;
         meshDS->SetNodeOnVertex(NC, vertID);
       }
       double dp = lp-fp;
-      int i = 0;
-      for(; i<myLayerPositions.size(); i++) {
+      size_t i = 0;
+      for ( ; i < myLayerPositions.size(); i++ ) {
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
                   P0.Z() + aVec.Z()*myLayerPositions[i] );
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
                   P0.Z() + aVec.Z()*myLayerPositions[i] );
@@ -826,7 +826,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
         Nodes1[i] = node;
         double param;
         SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
         Nodes1[i] = node;
         double param;
-        if(!ori)
+        if ( !ori )
           param = fp + dp*(1-myLayerPositions[i]);
         else
           param = fp + dp*myLayerPositions[i];
           param = fp + dp*(1-myLayerPositions[i]);
         else
           param = fp + dp*myLayerPositions[i];
@@ -840,11 +840,11 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       // create 1D elements on edge
       SMDS_MeshEdge* ME = myHelper->AddEdge( NC, Nodes1[0] );
       if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       // create 1D elements on edge
       SMDS_MeshEdge* ME = myHelper->AddEdge( NC, Nodes1[0] );
       if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
-      for(i=1; i<Nodes1.size(); i++) {
+      for ( i = 1; i < Nodes1.size(); i++ ) {
         ME = myHelper->AddEdge( Nodes1[i-1], Nodes1[i] );
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
         ME = myHelper->AddEdge( Nodes1[i-1], Nodes1[i] );
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
-      if (nbe==2 && LinEdge1.Orientation() == TopAbs_INTERNAL )
+      if ( nbe == 2 && LinEdge1.Orientation() == TopAbs_INTERNAL )
         Nodes2 = Nodes1;
     }
     markEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
         Nodes2 = Nodes1;
     }
     markEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
@@ -856,8 +856,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         return error("Invalid mesh on a straight edge");
 
       bool nodesFromP0ToP2 = ( theNodes.rbegin()->second == NL );
         return error("Invalid mesh on a straight edge");
 
       bool nodesFromP0ToP2 = ( theNodes.rbegin()->second == NL );
-      int i = 0, ir = Nodes1.size()-1;
-      int * pi = nodesFromP0ToP2 ? &i : &ir;
+      size_t i = 0, ir = Nodes1.size()-1;
+      size_t * pi = nodesFromP0ToP2 ? &i : &ir;
       itn = theNodes.begin();
       if ( nodesFromP0ToP2 ) ++itn;
       for ( ; i < Nodes2.size(); ++i, --ir, ++itn )
       itn = theNodes.begin();
       if ( nodesFromP0ToP2 ) ++itn;
       for ( ; i < Nodes2.size(); ++i, --ir, ++itn )
@@ -886,7 +886,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         PC = PL;
       }
       double dp = lp-fp;
         PC = PL;
       }
       double dp = lp-fp;
-      for(int i=0; i<myLayerPositions.size(); i++) {
+      for ( size_t i = 0; i < myLayerPositions.size(); i++ ) {
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
                   P0.Z() + aVec.Z()*myLayerPositions[i] );
         gp_Pnt P( P0.X() + aVec.X()*myLayerPositions[i],
                   P0.Y() + aVec.Y()*myLayerPositions[i],
                   P0.Z() + aVec.Z()*myLayerPositions[i] );
@@ -905,8 +905,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       Nodes2[ myLayerPositions.size() ] = NL;
       // create 1D elements on edge
       SMDS_MeshEdge* ME = myHelper->AddEdge( NC, Nodes2[0] );
       Nodes2[ myLayerPositions.size() ] = NL;
       // create 1D elements on edge
       SMDS_MeshEdge* ME = myHelper->AddEdge( NC, Nodes2[0] );
-      if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
-      for(int i=1; i<Nodes2.size(); i++) {
+      if ( ME ) meshDS->SetMeshElementOnShape(ME, edgeID);
+      for ( size_t i = 1; i < Nodes2.size(); i++ ) {
         ME = myHelper->AddEdge( Nodes2[i-1], Nodes2[i] );
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
         ME = myHelper->AddEdge( Nodes2[i-1], Nodes2[i] );
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
@@ -953,7 +953,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     // create faces
     tmpNodes.push_back( CNodes[i] );
     // quad
     // create faces
     tmpNodes.push_back( CNodes[i] );
     // quad
-    for(j=0; j<Nodes1.size()-1; j++) {
+    for ( j = 0; j < (int)Nodes1.size() - 1; j++ ) {
       SMDS_MeshFace* MF;
       if(IsForward)
         MF = myHelper->AddFace( tmpNodes[j], Nodes1[j],
       SMDS_MeshFace* MF;
       if(IsForward)
         MF = myHelper->AddFace( tmpNodes[j], Nodes1[j],
@@ -969,14 +969,14 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       MF = myHelper->AddFace( NC, Nodes1[0], tmpNodes[0] );
     else
       MF = myHelper->AddFace( NC, tmpNodes[0], Nodes1[0] );
       MF = myHelper->AddFace( NC, Nodes1[0], tmpNodes[0] );
     else
       MF = myHelper->AddFace( NC, tmpNodes[0], Nodes1[0] );
-    if(MF) meshDS->SetMeshElementOnShape(MF, faceID);
-    for(j=0; j<Nodes1.size(); j++) {
+    if ( MF ) meshDS->SetMeshElementOnShape(MF, faceID);
+    for ( j = 0; j < (int) Nodes1.size(); j++ ) {
       Nodes1[j] = tmpNodes[j];
     }
   }
   // create last faces
   // quad
       Nodes1[j] = tmpNodes[j];
     }
   }
   // create last faces
   // quad
-  for(i=0; i<Nodes1.size()-1; i++) {
+  for ( i = 0; i < (int)Nodes1.size()-1; i++ ) {
     SMDS_MeshFace* MF;
     if(IsForward)
       MF = myHelper->AddFace( Nodes2[i], Nodes1[i],
     SMDS_MeshFace* MF;
     if(IsForward)
       MF = myHelper->AddFace( Nodes2[i], Nodes1[i],
@@ -1106,7 +1106,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(const gp_Pnt&
       }
       else {
         
       }
       else {
         
-        if ( myLayerPositions.size() != nbNodes )
+        if ((int) myLayerPositions.size() != nbNodes )
           return error("Radial edge is meshed by other algorithm");
       }
     }
           return error("Radial edge is meshed by other algorithm");
       }
     }
@@ -1196,7 +1196,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
     ok = !aResMap.count( aMesh.GetSubMesh(LinEdge1) );
     if ( !ok ) {
       const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
     ok = !aResMap.count( aMesh.GetSubMesh(LinEdge1) );
     if ( !ok ) {
       const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
-      ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
+      ok = ( aVec[SMDSEntity_Node] == (int) myLayerPositions.size() );
     }
     if(ok) {
       ok = algo1d->EvaluateCircularEdge( aMesh, CircEdge, aResMap );
     }
     if(ok) {
       ok = algo1d->EvaluateCircularEdge( aMesh, CircEdge, aResMap );
@@ -1243,7 +1243,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
       // other curve not line
       return error(COMPERR_BAD_SHAPE);
     }
       // other curve not line
       return error(COMPERR_BAD_SHAPE);
     }
-    int nbLayers = myLayerPositions.size();
+    size_t nbLayers = myLayerPositions.size();
     computeLayerPositions( P0, P1, LinEdge2 );
     if ( nbLayers != myLayerPositions.size() )
       return error("Different hypotheses apply to radial edges");
     computeLayerPositions( P0, P1, LinEdge2 );
     if ( nbLayers != myLayerPositions.size() )
       return error("Different hypotheses apply to radial edges");
@@ -1254,7 +1254,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
         ok = true; // override other 1d hyps
       else {
         const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
         ok = true; // override other 1d hyps
       else {
         const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
-        ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
+        ok = ( aVec[SMDSEntity_Node] == (int) myLayerPositions.size() );
       }
     }
     if( ok && aResMap.count( aMesh.GetSubMesh(LinEdge2) )) {
       }
     }
     if( ok && aResMap.count( aMesh.GetSubMesh(LinEdge2) )) {
@@ -1262,7 +1262,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
         ok = true; // override other 1d hyps
       else {
         const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge2) ];
         ok = true; // override other 1d hyps
       else {
         const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge2) ];
-        ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
+        ok = ( aVec[SMDSEntity_Node] == (int) myLayerPositions.size() );
       }
     }
     if(ok) {
       }
     }
     if(ok) {
index 6a088119b25f94a429b4b0869522510102733b28..d653bfb0b20188b5f3d0b28ca6447a50d6cf3b87 100644 (file)
@@ -66,7 +66,7 @@ std::ostream & StdMeshers_Reversible1D::SaveTo(std::ostream & save)
 
   if ( !_edgeIDs.empty() )
   {
 
   if ( !_edgeIDs.empty() )
   {
-    for ( size_t i = 0; i < _edgeIDs.size(); i++)
+    for ( size_t i = 0; i < _edgeIDs.size(); i++ )
       save << " " << _edgeIDs[i];
     save << " " << _objEntry << " ";
   }
       save << " " << _edgeIDs[i];
     save << " " << _objEntry << " ";
   }
@@ -76,7 +76,7 @@ std::ostream & StdMeshers_Reversible1D::SaveTo(std::ostream & save)
 
 //=============================================================================
 /*!
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 
  */
 //=============================================================================
 
@@ -85,14 +85,14 @@ std::istream & StdMeshers_Reversible1D::LoadFrom(std::istream & load)
   bool isOK;
   int intVal;
 
   bool isOK;
   int intVal;
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
-    for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+    for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++ ) {
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
   }
 
   return load;
index e53ca623138910b6c0da526b8fcc4946dbb3edcc..3cc7562b482cd8bc6096c55ca1d224c9a9d8782a 100644 (file)
@@ -117,7 +117,7 @@ istream & StdMeshers_SegmentLengthAroundVertex::LoadFrom(istream & load)
 {
   bool isOK = true;
   double a;
 {
   bool isOK = true;
   double a;
-  isOK = (load >> a);
+  isOK = static_cast<bool>(load >> a);
   if (isOK)
     this->_length = a;
   else
   if (isOK)
     this->_length = a;
   else
index dffe92e9a229cae73566fe1ff030db66fcbc3e21..2c230524e49b3f7c45ca77dc444bb14ff9c81916 100644 (file)
@@ -146,22 +146,22 @@ istream & StdMeshers_StartEndLength::LoadFrom(istream & load)
 {
   bool isOK = true;
   int intVal;
 {
   bool isOK = true;
   int intVal;
-  isOK = (load >> _begLength);
+  isOK = static_cast<bool>(load >> _begLength);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
-  isOK = (load >> _endLength);
+  isOK = static_cast<bool>(load >> _endLength);
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
   }
 
   return load;
index 0d567e4fb232d2e74af3458a136ca8d5cd6547f5..e2471de3ae86d00c000e0eb62e10204bc1fa2851 100644 (file)
@@ -64,19 +64,19 @@ Plot2d_QwtLegendLabel* getLegendLabel( QwtPlotCurve* plotCurve )
   QwtLegend* legend = dynamic_cast<QwtLegend*>( plotCurve->plot()->legend() );
   QWidget* widget = legend->legendWidget( itemInfo );
   QwtLegendLabel* label = dynamic_cast<QwtLegendLabel*>( widget );
   QwtLegend* legend = dynamic_cast<QwtLegend*>( plotCurve->plot()->legend() );
   QWidget* widget = legend->legendWidget( itemInfo );
   QwtLegendLabel* label = dynamic_cast<QwtLegendLabel*>( widget );
-  if( Plot2d_QwtLegendLabel* anItem = (Plot2d_QwtLegendLabel*)label )
-    return anItem;
+  Plot2d_QwtLegendLabel* anItem = (Plot2d_QwtLegendLabel*)label;
+  return anItem;
 }
 
 StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h )
 }
 
 StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h )
-: QwtPlot( p ),
-  myPoints( 50 ),
-  myIsTable( false ),
-  myVars( 1, 1 ),
-  myValues( 1, 1 ),
-  myConv( CUT_NEGATIVE ),
-  myIsDone( true ),
-  myNbSeg( 1 )
+  : QwtPlot( p ),
+    myPoints( 50 ),
+    myNbSeg( 1 ),
+    myIsTable( false ),
+    myConv( CUT_NEGATIVE ),
+    myVars( 1, 1 ),
+    myValues( 1, 1 ),
+    myIsDone( true )
 {
   Kernel_Utils::Localizer loc;
   myHypo = StdMeshers::StdMeshers_NumberOfSegments::_duplicate( h );
 {
   Kernel_Utils::Localizer loc;
   myHypo = StdMeshers::StdMeshers_NumberOfSegments::_duplicate( h );
index 2066cac77a02cd2bc0fb54f87bb29523844a8e9a..0b5246735ca3af43fcc843ca7240c489723f235f 100644 (file)
@@ -574,7 +574,7 @@ StdMeshersGUI_DistrTableFrame::
 setData( const DataArray& array )
 {
   QList<double> d;
 setData( const DataArray& array )
 {
   QList<double> d;
-  for ( int i = 0; i < array.length(); i++ )
+  for ( CORBA::ULong i = 0; i < array.length(); i++ )
     d.append( array[i] );
 
   sortData( d );
     d.append( array[i] );
 
   sortData( d );
index 3b5ece91c76d2661195971d527270a09020f6b72..7f75b9b6c77a592c5925e369f57e7a803576d071 100644 (file)
@@ -360,7 +360,7 @@ SMESH::double_array_var StdMeshersGUI_FixedPointsParamWdg::GetListOfPoints()
 void StdMeshersGUI_FixedPointsParamWdg::SetListOfPoints( SMESH::double_array_var thePoints)
 {
   clear();
 void StdMeshersGUI_FixedPointsParamWdg::SetListOfPoints( SMESH::double_array_var thePoints)
 {
   clear();
-  for ( int i = 0; i < thePoints->length(); i++ ) {
+  for ( CORBA::ULong i = 0; i < thePoints->length(); i++ ) {
     addPoint( thePoints[ i ] );
   }
 }
     addPoint( thePoints[ i ] );
   }
 }
@@ -388,7 +388,7 @@ void StdMeshersGUI_FixedPointsParamWdg::SetListOfSegments( SMESH::long_array_var
 {
   if ( myListWidget->count() > 0 && theSegments->length() == 1)
     mySameValues->setChecked(true);
 {
   if ( myListWidget->count() > 0 && theSegments->length() == 1)
     mySameValues->setChecked(true);
-  for ( int i = 0; i < theSegments->length(); i++ ) {
+  for ( CORBA::ULong i = 0; i < theSegments->length(); i++ ) {
     setNbSegments( i, theSegments[i] );
   }
 }
     setNbSegments( i, theSegments[i] );
   }
 }
index 82d2e437d8726a5a743e365d02278b3e1f5ebf3c..57e21193d3c01efc8e8a4c4f4ed4c25db1b27529 100644 (file)
@@ -45,7 +45,7 @@
 //================================================================================
 /*!
  * \brief Constructor initialized by filter
 //================================================================================
 /*!
  * \brief Constructor initialized by filter
 * \param f - object filter
+ * \param f - object filter
  */
 //================================================================================
 
  */
 //================================================================================
 
@@ -53,8 +53,8 @@ StdMeshersGUI_LayerDistributionParamWdg
 ::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr holderHyp,
                                           SMESH::SMESH_Hypothesis_ptr distribHyp,
                                           const QString&              name,
 ::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr holderHyp,
                                           SMESH::SMESH_Hypothesis_ptr distribHyp,
                                           const QString&              name,
-                                          QDialog*                    dlg): 
-  QWidget(), myName(name), myDlg( dlg )
+                                          QDialog*                    dlg):
+  QWidget(), myDlg( dlg ), myName(name)
 {
   myHolderHyp = SMESH::SMESH_Hypothesis::_duplicate( holderHyp );
   init();
 {
   myHolderHyp = SMESH::SMESH_Hypothesis::_duplicate( holderHyp );
   init();
index 6749e0b9c753d5653eff3116fe0d1e0be5dd39e6..9a9f2756bc28171ad1f6e3dd8aeb7f6fe23992e5 100644 (file)
@@ -295,13 +295,13 @@ QString StdMeshersGUI_NbSegmentsCreator::storeParams() const
   case Regular :
     valStr += tr("SMESH_DISTR_REGULAR");
     break;
   case Regular :
     valStr += tr("SMESH_DISTR_REGULAR");
     break;
-  case Scale   : 
-    valStr += tr("SMESH_NB_SEGMENTS_SCALE_PARAM") + " = " + QString::number( data.myScale );\
+  case Scale   :
+    valStr += tr("SMESH_NB_SEGMENTS_SCALE_PARAM") + " = " + QString::number( data.myScale );
     break;
   case TabFunc : {
     //valStr += tr("SMESH_TAB_FUNC");
     bool param = true;
     break;
   case TabFunc : {
     //valStr += tr("SMESH_TAB_FUNC");
     bool param = true;
-    for( int i=0; i < data.myTable.length(); i++, param = !param ) {
+    for( CORBA::ULong i = 0; i < data.myTable.length(); i++, param = !param ) {
       if ( param )
         valStr += "[";
       valStr += QString::number( data.myTable[ i ]);
       if ( param )
         valStr += "[";
       valStr += QString::number( data.myTable[ i ]);
index 379e593d5a892dc2976b8eee896afaf9b292ff28..accf0ccb704294f8f330447acef990e3ca8cff8e 100644 (file)
@@ -656,7 +656,7 @@ std::vector<std::string> * MeshJobManager_i::_getResourceNames() {
   LOG("### resource list:");
   std::vector<std::string>* resourceNames = new std::vector<std::string>();
   if (resourceList) {
   LOG("### resource list:");
   std::vector<std::string>* resourceNames = new std::vector<std::string>();
   if (resourceList) {
-    for (int i = 0; i < resourceList->length(); i++) {
+    for ( size_t i = 0; i < resourceList->length(); i++) {
       const char* aResourceName = (*resourceList)[i];
       resourceNames->push_back(std::string(aResourceName));
       LOG("resource["<<i<<"] = "<<aResourceName);
       const char* aResourceName = (*resourceList)[i];
       resourceNames->push_back(std::string(aResourceName));
       LOG("resource["<<i<<"] = "<<aResourceName);