From 3369d458eaf2f08db6e32b75609679f06771a5cb Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 27 Oct 2015 20:47:31 +0300 Subject: [PATCH] IPAL52935: "Apply and Close" button is not available in "Make 0D Elements on Element Nodes" dialog box (SMESHGUI_Add0DElemsOnAllNodesDlg.cxx) Eliminate compilation warnings (all the rest files) --- src/DriverCGNS/DriverCGNS_Read.cxx | 10 +- src/DriverMED/DriverMED_W_Field.cxx | 6 +- src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx | 2 +- src/DriverUNV/UNV_Utilities.hxx | 12 +- src/SMDS/SMDS_FaceOfNodes.cxx | 5 +- src/SMDS/SMDS_Mesh.cxx | 209 +++++++++--------- src/SMDS/SMDS_Mesh.hxx | 7 +- src/SMDS/SMDS_MeshElementIDFactory.cxx | 6 +- src/SMDS/SMDS_MeshInfo.hxx | 8 +- src/SMDS/SMDS_PolygonalFaceOfNodes.cxx | 2 +- src/SMDS/SMDS_QuadraticFaceOfNodes.cxx | 8 +- src/SMDS/SMDS_UnstructuredGrid.cxx | 24 +- src/SMDS/SMDS_VolumeOfNodes.cxx | 2 +- src/SMDS/SMDS_VtkVolume.cxx | 2 +- src/SMESH/SMESH_Algo.cxx | 4 +- src/SMESH/SMESH_Gen.hxx | 2 +- src/SMESH/SMESH_HypoFilter.cxx | 9 +- src/SMESH/SMESH_Hypothesis.cxx | 3 +- src/SMESH/SMESH_Mesh.cxx | 2 +- src/SMESH/SMESH_ProxyMesh.cxx | 4 +- src/SMESH/SMESH_subMesh.cxx | 6 +- src/SMESHDS/SMESHDS_TSubMeshHolder.hxx | 4 +- .../SMESHGUI_Add0DElemsOnAllNodesDlg.cxx | 3 + src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx | 4 +- src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx | 4 +- src/SMESHGUI/SMESHGUI_MergeDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx | 8 +- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 5 +- src/SMESHGUI/SMESHGUI_NodesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_PreviewDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_Selection.cxx | 2 +- src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 42 +--- src/SMESHGUI/SMESHGUI_Utils.h | 2 +- src/StdMeshers/StdMeshers_Adaptive1D.cxx | 4 +- src/StdMeshers/StdMeshers_Arithmetic1D.cxx | 4 +- .../StdMeshers_CompositeHexa_3D.cxx | 6 +- src/StdMeshers/StdMeshers_Deflection1D.cxx | 2 +- src/StdMeshers/StdMeshers_FixedPoints1D.cxx | 6 +- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 4 +- src/StdMeshers/StdMeshers_Import_1D.cxx | 12 +- src/StdMeshers/StdMeshers_Import_1D2D.cxx | 2 +- src/StdMeshers/StdMeshers_LocalLength.cxx | 2 +- src/StdMeshers/StdMeshers_MEFISTO_2D.cxx | 6 +- src/StdMeshers/StdMeshers_MaxLength.cxx | 2 +- src/StdMeshers/StdMeshers_Penta_3D.cxx | 6 +- src/StdMeshers/StdMeshers_Prism_3D.cxx | 9 +- src/StdMeshers/StdMeshers_Projection_3D.cxx | 8 +- src/StdMeshers/StdMeshers_Propagation.cxx | 12 +- .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 14 +- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 7 +- src/StdMeshers/StdMeshers_Regular_1D.cxx | 13 +- src/StdMeshers/StdMeshers_StartEndLength.cxx | 6 +- src/StdMeshers/StdMeshers_ViscousLayers2D.cxx | 16 +- .../StdMeshersGUI_NbSegmentsCreator.cxx | 2 +- .../StdMeshersGUI_PropagationHelperWdg.cxx | 2 +- .../StdMeshersGUI_QuadrangleParamWdg.cxx | 4 +- .../StdMeshersGUI_SubShapeSelectorWdg.cxx | 4 +- .../StdMeshers_Arithmetic1D_i.cxx | 2 +- .../StdMeshers_LayerDistribution2D_i.cxx | 4 +- .../StdMeshers_NumberOfLayers2D_i.cxx | 4 +- .../StdMeshers_NumberOfSegments_i.cxx | 3 +- .../StdMeshers_Reversible1D_i.cxx | 2 +- .../StdMeshers_StartEndLength_i.cxx | 2 +- 72 files changed, 289 insertions(+), 324 deletions(-) diff --git a/src/DriverCGNS/DriverCGNS_Read.cxx b/src/DriverCGNS/DriverCGNS_Read.cxx index cf4709edb..4393e471c 100644 --- a/src/DriverCGNS/DriverCGNS_Read.cxx +++ b/src/DriverCGNS/DriverCGNS_Read.cxx @@ -234,7 +234,7 @@ namespace dist2 = ( nn1[1] - nn2[1] ).Modulus(); tol = 1e-5 * ( nn1[0] - nn1[1] ).Modulus(); } - return ( dist1 < tol & dist2 < tol ); + return ( dist1 < tol && dist2 < tol ); } return false; } @@ -451,7 +451,7 @@ namespace if ( !_nodeReplacementMap.empty() ) { map< int, int >::const_iterator it, end = _nodeReplacementMap.end(); - for ( size_t i = 0; i < nbIds; ++i ) + for ( int i = 0; i < nbIds; ++i ) if (( it = _nodeReplacementMap.find( ids[i] + idShift)) != end ) ids[i] = it->second; else @@ -459,7 +459,7 @@ namespace } else if ( idShift ) { - for ( size_t i = 0; i < nbIds; ++i ) + for ( int i = 0; i < nbIds; ++i ) ids[i] += idShift; } } @@ -1022,7 +1022,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform() if ( zone.IsStructured() ) { int axis = 0; // axis perpendiculaire to which boundary elements are oriented - if ( ids.size() >= meshDim * 2 ) + if ( (int) ids.size() >= meshDim * 2 ) { for ( ; axis < meshDim; ++axis ) if ( ids[axis] - ids[axis+meshDim] == 0 ) @@ -1127,7 +1127,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform() if ( psType == CGNS_ENUMV( PointRange ) && ids.size() == 2 ) { - for ( size_t i = ids[0]; i <= ids[1]; ++i ) + for ( cgsize_t i = ids[0]; i <= ids[1]; ++i ) if ( const SMDS_MeshElement* e = myMesh->FindElement( i )) groupDS.Add( e ); } diff --git a/src/DriverMED/DriverMED_W_Field.cxx b/src/DriverMED/DriverMED_W_Field.cxx index 71082464c..e40aac434 100644 --- a/src/DriverMED/DriverMED_W_Field.cxx +++ b/src/DriverMED/DriverMED_W_Field.cxx @@ -168,7 +168,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, void DriverMED_W_Field::SetCompName(const int iComp, const char* name) { - if ( _compNames.size() <= iComp ) + if ( (int)_compNames.size() <= iComp ) _compNames.resize( iComp + 1 ); _compNames[ iComp ] = name; } @@ -327,7 +327,7 @@ Driver_Mesh::Status DriverMED_W_Field::Perform() MED::PIntTimeStampValue timeStampIntVal = timeStampVal; // set values - int iVal = 0, i, nbE; + int iVal = 0; MED::TFloat* ptrDbl = 0; MED::TInt* ptrInt = 0; for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG ) @@ -354,6 +354,8 @@ Driver_Mesh::Status DriverMED_W_Field::Perform() _dblValues.clear(); _intValues.clear(); + + return DRS_OK; } namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx index 243d9f350..5aa64330a 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx @@ -183,7 +183,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform() aRec.fe_descriptor_id = anId; aRec.node_labels.reserve(aNbNodes); SMDS_NodeIteratorPtr aNodesIter = anElem->nodesIteratorToUNV(); - while ( aNodesIter->more() && aRec.node_labels.size() < aNbNodes ) + while ( aNodesIter->more() && (int)aRec.node_labels.size() < aNbNodes ) { const SMDS_MeshElement* aNode = aNodesIter->next(); aRec.node_labels.push_back(aNode->GetID()); diff --git a/src/DriverUNV/UNV_Utilities.hxx b/src/DriverUNV/UNV_Utilities.hxx index 413ccfa5a..28ebcd17f 100644 --- a/src/DriverUNV/UNV_Utilities.hxx +++ b/src/DriverUNV/UNV_Utilities.hxx @@ -93,17 +93,17 @@ namespace UNV{ */ inline double D_to_e(std::string& number) { - /* find "D" in string, start looking at + /* find "D" in string, start looking at * 6th element, to improve speed. * We dont expect a "D" earlier */ - const int position = number.find("D",6); - if(position != std::string::npos){ - number.replace(position, 1, "e"); - } + const size_t position = number.find("D",6); + if ( position != std::string::npos ) + number.replace(position, 1, "e"); + return atof (number.c_str()); } - + /** * @returns \p false when file is incorrect, \p true otherwise. * Check file with name \p theFileName for correct terminate diff --git a/src/SMDS/SMDS_FaceOfNodes.cxx b/src/SMDS/SMDS_FaceOfNodes.cxx index da8e96d69..42859c88a 100644 --- a/src/SMDS/SMDS_FaceOfNodes.cxx +++ b/src/SMDS/SMDS_FaceOfNodes.cxx @@ -90,7 +90,7 @@ class SMDS_FaceOfNodes_MyIterator:public SMDS_NodeArrayElemIterator class _MyEdgeIterator : public SMDS_ElemIterator { vector< const SMDS_MeshElement* > myElems; - int myIndex; + size_t myIndex; public: _MyEdgeIterator(const SMDS_FaceOfNodes* face):myIndex(0) { myElems.reserve( face->NbNodes() ); @@ -108,8 +108,7 @@ public: virtual const SMDS_MeshElement* next() { return myElems[ myIndex++ ]; } }; -SMDS_ElemIteratorPtr SMDS_FaceOfNodes::elementsIterator - (SMDSAbs_ElementType type) const +SMDS_ElemIteratorPtr SMDS_FaceOfNodes::elementsIterator( SMDSAbs_ElementType type ) const { switch(type) { diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index 87a2f1558..c4cadf10f 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -124,16 +124,16 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc) /////////////////////////////////////////////////////////////////////////////// /// Create a new mesh object /////////////////////////////////////////////////////////////////////////////// -SMDS_Mesh::SMDS_Mesh() - :myParent(NULL), - myNodeIDFactory(new SMDS_MeshNodeIDFactory()), - myElementIDFactory(new SMDS_MeshElementIDFactory()), - myHasConstructionEdges(false), myHasConstructionFaces(false), - myHasInverseElements(true), - myNodeMin(0), myNodeMax(0), - myNodePool(0), myEdgePool(0), myFacePool(0), myVolumePool(0),myBallPool(0), - myModified(false), myModifTime(0), myCompactTime(0), - xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0) +SMDS_Mesh::SMDS_Mesh(): + myNodePool(0), myVolumePool(0), myFacePool(0), myEdgePool(0), myBallPool(0), + myParent(NULL), + myNodeIDFactory(new SMDS_MeshNodeIDFactory()), + myElementIDFactory(new SMDS_MeshElementIDFactory()), + myModified(false), myModifTime(0), myCompactTime(0), + myNodeMin(0), myNodeMax(0), + myHasConstructionEdges(false), myHasConstructionFaces(false), + myHasInverseElements(true), + xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0) { myMeshId = _meshList.size(); // --- index of the mesh to push back in the vector myNodeIDFactory->SetMesh(this); @@ -169,16 +169,16 @@ SMDS_Mesh::SMDS_Mesh() /// Note that the tree structure of SMDS_Mesh seems to be unused in this version /// (2003-09-08) of SMESH /////////////////////////////////////////////////////////////////////////////// -SMDS_Mesh::SMDS_Mesh(SMDS_Mesh * parent) - :myParent(parent), myNodeIDFactory(parent->myNodeIDFactory), - myElementIDFactory(parent->myElementIDFactory), - myHasConstructionEdges(false), myHasConstructionFaces(false), - myHasInverseElements(true), - myNodePool(parent->myNodePool), - myEdgePool(parent->myEdgePool), - myFacePool(parent->myFacePool), - myVolumePool(parent->myVolumePool), - myBallPool(parent->myBallPool) +SMDS_Mesh::SMDS_Mesh(SMDS_Mesh * parent): + myNodePool(parent->myNodePool), + myVolumePool(parent->myVolumePool), + myFacePool(parent->myFacePool), + myEdgePool(parent->myEdgePool), + myBallPool(parent->myBallPool), + myParent(parent), myNodeIDFactory(parent->myNodeIDFactory), + myElementIDFactory(parent->myElementIDFactory), + myHasConstructionEdges(false), myHasConstructionFaces(false), + myHasInverseElements(true) { } @@ -188,9 +188,9 @@ SMDS_Mesh::SMDS_Mesh(SMDS_Mesh * parent) SMDS_Mesh *SMDS_Mesh::AddSubMesh() { - SMDS_Mesh *submesh = new SMDS_Mesh(this); - myChildren.insert(myChildren.end(), submesh); - return submesh; + SMDS_Mesh *submesh = new SMDS_Mesh(this); + myChildren.insert(myChildren.end(), submesh); + return submesh; } /////////////////////////////////////////////////////////////////////////////// @@ -223,7 +223,7 @@ SMDS_MeshNode * SMDS_Mesh::AddNodeWithID(double x, double y, double z, int ID) SMDS_MeshNode * node = myNodePool->getNew(); node->init(ID, myMeshId, 0, x, y, z); - if (ID >= myNodes.size()) + if (ID >= (int)myNodes.size()) { myNodes.resize(ID+SMDS_Mesh::chunkSize, 0); // MESSAGE(" ------------------ myNodes resize " << ID << " --> " << ID+SMDS_Mesh::chunkSize); @@ -1649,7 +1649,7 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceFromVtkIdsWithID(const std::vector& bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element) { //MESSAGE("registerElement " << ID); - if ((ID >=0) && (ID < myCells.size()) && myCells[ID]) // --- already bound + if ((ID >=0) && (ID < (int)myCells.size()) && myCells[ID]) // --- already bound { MESSAGE(" ------------------ already bound "<< ID << " " << myCells[ID]->getVtkId()); return false; @@ -1664,7 +1664,7 @@ bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element) if (vtkId == -1) vtkId = myElementIDFactory->SetInVtkGrid(element); - if (vtkId >= myCellIdVtkToSmds.size()) // --- resize local vector + if (vtkId >= (int)myCellIdVtkToSmds.size()) // --- resize local vector { // MESSAGE(" --------------------- resize myCellIdVtkToSmds " << vtkId << " --> " << vtkId + SMDS_Mesh::chunkSize); myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1); @@ -1691,7 +1691,7 @@ void SMDS_Mesh::MoveNode(const SMDS_MeshNode *n, double x, double y, double z) /////////////////////////////////////////////////////////////////////////////// const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const { - if (ID < 1 || ID >= myNodes.size()) + if (ID < 1 || ID >= (int)myNodes.size()) { // MESSAGE("------------------------------------------------------------------------- "); // MESSAGE("----------------------------------- bad ID " << ID << " " << myNodes.size()); @@ -1707,7 +1707,7 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const const SMDS_MeshNode * SMDS_Mesh::FindNodeVtk(int vtkId) const { // TODO if needed use mesh->nodeIdFromVtkToSmds - if (vtkId < 0 || vtkId >= (myNodes.size() -1)) + if ( vtkId < 0 || vtkId+1 >= (int) myNodes.size() ) { MESSAGE("------------------------------------------------------------------------- "); MESSAGE("---------------------------- bad VTK ID " << vtkId << " " << myNodes.size()); @@ -2426,7 +2426,7 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace(const SMDS_MeshNode *node1, const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const { - if ((IDelem <= 0) || IDelem >= myCells.size()) + if ( IDelem <= 0 || IDelem >= (int)myCells.size() ) { MESSAGE("--------------------------------------------------------------------------------- "); MESSAGE("----------------------------------- bad IDelem " << IDelem << " " << myCells.size()); @@ -2482,7 +2482,7 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement (const vectornext(); int nbNodesToCheck = noMedium ? e->NbCornerNodes() : e->NbNodes(); - if ( nbNodesToCheck == nodes.size() ) + if ( nbNodesToCheck == (int)nodes.size() ) { for ( size_t i = 1; e && i < nodes.size(); ++i ) { @@ -3110,28 +3110,27 @@ static set * getFinitElements(const SMDS_MeshElement * /////////////////////////////////////////////////////////////////////////////// /// Return the list of nodes used only by the given elements /////////////////////////////////////////////////////////////////////////////// -static set * getExclusiveNodes( - set& elements) +static set * getExclusiveNodes(set& elements) { - set * toReturn=new set(); - set::iterator itElements=elements.begin(); + set * toReturn=new set(); + set::iterator itElements=elements.begin(); - while(itElements!=elements.end()) - { - SMDS_ElemIteratorPtr itNodes = (*itElements)->nodesIterator(); - itElements++; + while(itElements!=elements.end()) + { + SMDS_ElemIteratorPtr itNodes = (*itElements)->nodesIterator(); + itElements++; - while(itNodes->more()) - { - const SMDS_MeshNode * n=static_cast(itNodes->next()); - SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator(); - set s; - while(itFe->more()) - s.insert(itFe->next()); - if(s==elements) toReturn->insert(n); - } - } - return toReturn; + while(itNodes->more()) + { + const SMDS_MeshNode * n=static_cast(itNodes->next()); + SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator(); + set s; + while(itFe->more()) + s.insert(itFe->next()); + if(s==elements) toReturn->insert(n); + } + } + return toReturn; } /////////////////////////////////////////////////////////////////////////////// @@ -3145,62 +3144,63 @@ void SMDS_Mesh::addChildrenWithNodes(set& setOfChildren set& nodes) { switch(element->GetType()) + { + case SMDSAbs_Node: + MESSAGE("Internal Error: This should not happen"); + break; + case SMDSAbs_0DElement: + { + } + break; + case SMDSAbs_Edge: + { + SMDS_ElemIteratorPtr itn=element->nodesIterator(); + while(itn->more()) { - case SMDSAbs_Node: - MESSAGE("Internal Error: This should not happen"); - break; - case SMDSAbs_0DElement: + const SMDS_MeshElement * e=itn->next(); + if(nodes.find(e)!=nodes.end()) { + setOfChildren.insert(element); + break; } - break; - case SMDSAbs_Edge: - { - SMDS_ElemIteratorPtr itn=element->nodesIterator(); - while(itn->more()) - { - const SMDS_MeshElement * e=itn->next(); - if(nodes.find(e)!=nodes.end()) - { - setOfChildren.insert(element); - break; - } - } - } break; - case SMDSAbs_Face: - { - SMDS_ElemIteratorPtr itn=element->nodesIterator(); - while(itn->more()) - { - const SMDS_MeshElement * e=itn->next(); - if(nodes.find(e)!=nodes.end()) - { - setOfChildren.insert(element); - break; - } - } - if(hasConstructionEdges()) - { - SMDS_ElemIteratorPtr ite=element->edgesIterator(); - while(ite->more()) - addChildrenWithNodes(setOfChildren, ite->next(), nodes); - } - } break; - case SMDSAbs_Volume: - { - if(hasConstructionFaces()) - { - SMDS_ElemIteratorPtr ite=element->facesIterator(); - while(ite->more()) - addChildrenWithNodes(setOfChildren, ite->next(), nodes); - } - else if(hasConstructionEdges()) - { - SMDS_ElemIteratorPtr ite=element->edgesIterator(); - while(ite->more()) - addChildrenWithNodes(setOfChildren, ite->next(), nodes); - } - } } + } break; + case SMDSAbs_Face: + { + SMDS_ElemIteratorPtr itn=element->nodesIterator(); + while(itn->more()) + { + const SMDS_MeshElement * e=itn->next(); + if(nodes.find(e)!=nodes.end()) + { + setOfChildren.insert(element); + break; + } + } + if(hasConstructionEdges()) + { + SMDS_ElemIteratorPtr ite=element->edgesIterator(); + while(ite->more()) + addChildrenWithNodes(setOfChildren, ite->next(), nodes); + } + } break; + case SMDSAbs_Volume: + { + if(hasConstructionFaces()) + { + SMDS_ElemIteratorPtr ite=element->facesIterator(); + while(ite->more()) + addChildrenWithNodes(setOfChildren, ite->next(), nodes); + } + else if(hasConstructionEdges()) + { + SMDS_ElemIteratorPtr ite=element->edgesIterator(); + while(ite->more()) + addChildrenWithNodes(setOfChildren, ite->next(), nodes); + } + } + case SMDSAbs_All: break; + } } /////////////////////////////////////////////////////////////////////////////// @@ -3347,6 +3347,9 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem, else delete (*it); break; + + case SMDSAbs_All: + case SMDSAbs_NbElementTypes: break; } if (vtkid >= 0) { @@ -4685,7 +4688,7 @@ void SMDS_Mesh::updateNodeMinMax() myNodeMax=0; return; } - while (!myNodes[myNodeMin] && (myNodeMin=0)) @@ -4775,7 +4778,7 @@ void SMDS_Mesh::compactMesh() int SMDS_Mesh::fromVtkToSmds(int vtkid) { - if (vtkid >= 0 && vtkid < myCellIdVtkToSmds.size()) + if (vtkid >= 0 && vtkid < (int)myCellIdVtkToSmds.size()) return myCellIdVtkToSmds[vtkid]; throw SALOME_Exception(LOCALIZED ("vtk id out of bounds")); } diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 7c728d6f9..b561d7571 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -789,7 +789,7 @@ protected: { assert(ID >= 0); myElementIDFactory->adjustMaxId(ID); - if (ID >= myCells.size()) + if (ID >= (int)myCells.size()) myCells.resize(ID+SMDS_Mesh::chunkSize,0); } @@ -838,6 +838,8 @@ protected: SMDS_MeshElementIDFactory *myElementIDFactory; SMDS_MeshInfo myInfo; + //! any add, remove or change of node or cell + bool myModified; //! use a counter to keep track of modifications unsigned long myModifTime, myCompactTime; @@ -848,9 +850,6 @@ protected: bool myHasConstructionFaces; bool myHasInverseElements; - //! any add, remove or change of node or cell - bool myModified; - double xmin; double xmax; double ymin; diff --git a/src/SMDS/SMDS_MeshElementIDFactory.cxx b/src/SMDS/SMDS_MeshElementIDFactory.cxx index f8eb2ddef..5bf7398ca 100644 --- a/src/SMDS/SMDS_MeshElementIDFactory.cxx +++ b/src/SMDS/SMDS_MeshElementIDFactory.cxx @@ -95,7 +95,7 @@ bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem) //======================================================================= SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID) { - if ((ID<1) || (ID>=myMesh->myCells.size())) + if ( ID<1 || ID >= (int) myMesh->myCells.size() ) return NULL; const SMDS_MeshElement* elem = GetMesh()->FindElement(ID); return (SMDS_MeshElement*)(elem); @@ -129,7 +129,7 @@ void SMDS_MeshElementIDFactory::ReleaseID(int ID, int vtkId) //MESSAGE("~~~~~~~~~~~~~~ SMDS_MeshElementIDFactory::ReleaseID smdsId vtkId " << ID << " " << vtkId); if (vtkId >= 0) { - assert(vtkId < myMesh->myCellIdVtkToSmds.size()); + assert(vtkId < (int)myMesh->myCellIdVtkToSmds.size()); myMesh->myCellIdVtkToSmds[vtkId] = -1; myMesh->setMyModified(); } @@ -149,7 +149,7 @@ void SMDS_MeshElementIDFactory::updateMinMax() const { myMin = INT_MAX; myMax = 0; - for (int i = 0; i < myMesh->myCells.size(); i++) + for (size_t i = 0; i < myMesh->myCells.size(); i++) { if (myMesh->myCells[i]) { diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index 5c22d7f9b..4c6dba726 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -192,7 +192,7 @@ inline SMDS_MeshInfo::SMDS_MeshInfo(): inline SMDS_MeshInfo& // operator= SMDS_MeshInfo::operator=(const SMDS_MeshInfo& other) -{ for ( int i=0; i myElems; - int myIndex; + size_t myIndex; public: _MyEdgeIterator(const SMDS_MeshFace* face):myIndex(0) { myElems.reserve( face->NbNodes() ); diff --git a/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx index f427dac96..a308239eb 100644 --- a/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx +++ b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx @@ -168,14 +168,14 @@ namespace { //======================================================================= //class : _MyInterlacedNodeIterator - //purpose : + //purpose : //======================================================================= class _MyInterlacedNodeIterator:public SMDS_NodeIterator { const vector& mySet; - int myIndex; - const int * myInterlace; + size_t myIndex; + const int * myInterlace; public: _MyInterlacedNodeIterator(const vector& s, const int * interlace): @@ -228,7 +228,7 @@ SMDS_NodeIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesIterator() const class _MyEdgeIterator : public SMDS_ElemIterator { vector< const SMDS_MeshElement* > myElems; - int myIndex; + size_t myIndex; public: _MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) { myElems.reserve( face->NbNodes() ); diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index 5fe82a432..52916ec72 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -354,12 +354,12 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes, int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId) { - if((vtkCellId < 0) || (vtkCellId >= _cellIdToDownId.size())) - { - //MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId=" - // << vtkCellId << " max="<< _cellIdToDownId.size()); - return -1; - } + if ((vtkCellId < 0) || (vtkCellId >= (int)_cellIdToDownId.size())) + { + //MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId=" + // << vtkCellId << " max="<< _cellIdToDownId.size()); + return -1; + } return _cellIdToDownId[vtkCellId]; } @@ -371,12 +371,12 @@ void SMDS_UnstructuredGrid::setCellIdToDownId(int vtkCellId, int downId) void SMDS_UnstructuredGrid::CleanDownwardConnectivity() { - for (int i = 0; i < _downArray.size(); i++) - { - if (_downArray[i]) - delete _downArray[i]; - _downArray[i] = 0; - } + for (size_t i = 0; i < _downArray.size(); i++) + { + if (_downArray[i]) + delete _downArray[i]; + _downArray[i] = 0; + } _cellIdToDownId.clear(); } diff --git a/src/SMDS/SMDS_VolumeOfNodes.cxx b/src/SMDS/SMDS_VolumeOfNodes.cxx index 80d41a263..612e6e7f4 100644 --- a/src/SMDS/SMDS_VolumeOfNodes.cxx +++ b/src/SMDS/SMDS_VolumeOfNodes.cxx @@ -191,7 +191,7 @@ class SMDS_VolumeOfNodes_MyIterator:public SMDS_NodeArrayElemIterator class _MySubIterator : public SMDS_ElemIterator { vector< const SMDS_MeshElement* > myElems; - int myIndex; + size_t myIndex; public: _MySubIterator(const SMDS_VolumeOfNodes* vol, SMDSAbs_ElementType type):myIndex(0) { SMDS_VolumeTool vTool(vol); diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index 015edf75f..d6da43579 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -165,7 +165,7 @@ bool SMDS_VtkVolume::vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes) const std::vector& interlace = SMDS_MeshCell::toVtkOrder( VTKCellType( aVtkType )); if ( !interlace.empty() ) { - ASSERT( interlace.size() == nbNodes ); + ASSERT( (int)interlace.size() == nbNodes ); std::vector initNodes( nodes, nodes+nbNodes ); for ( size_t i = 0; i < interlace.size(); ++i ) nodes[i] = initNodes[ interlace[i] ]; diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index b7992de2f..56d41720d 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -449,7 +449,7 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh* theM if ( n2 && ++nbNodes ) theNodes.insert( make_pair( l, n2 )); - return theNodes.size() == nbNodes; + return (int)theNodes.size() == nbNodes; } //================================================================================ @@ -469,7 +469,7 @@ SMESH_Algo::GetCompatibleHypoFilter(const bool ignoreAuxiliary) const { SMESH_HypoFilter* filter = new SMESH_HypoFilter(); filter->Init( filter->HasName( _compatibleHypothesis[0] )); - for ( int i = 1; i < _compatibleHypothesis.size(); ++i ) + for ( size_t i = 1; i < _compatibleHypothesis.size(); ++i ) filter->Or( filter->HasName( _compatibleHypothesis[ i ] )); SMESH_HypoFilter* filterNoAux = new SMESH_HypoFilter( filter ); diff --git a/src/SMESH/SMESH_Gen.hxx b/src/SMESH/SMESH_Gen.hxx index eb09db52b..94a28a279 100644 --- a/src/SMESH/SMESH_Gen.hxx +++ b/src/SMESH/SMESH_Gen.hxx @@ -125,7 +125,7 @@ public: int _algoDim; bool _isGlobalAlgo; - TAlgoStateError(): _algoDim(0),_algo(0),_name(SMESH_Hypothesis::HYP_OK) {} + TAlgoStateError(): _name(SMESH_Hypothesis::HYP_OK), _algo(0), _algoDim(0) {} void Set(TAlgoStateErrorName name, const SMESH_Algo* algo, bool isGlobal) { _name = name; _algo = algo; _algoDim = algo->GetDim(); _isGlobalAlgo = isGlobal; } void Set(TAlgoStateErrorName name, const int algoDim, bool isGlobal) diff --git a/src/SMESH/SMESH_HypoFilter.cxx b/src/SMESH/SMESH_HypoFilter.cxx index fcebe63d3..a5fd2f457 100644 --- a/src/SMESH/SMESH_HypoFilter.cxx +++ b/src/SMESH/SMESH_HypoFilter.cxx @@ -131,19 +131,22 @@ void SMESH_HypoFilter::IsMoreLocalThanPredicate::findPreferable() { const int shapeID = _mesh.GetMeshDS()->ShapeToIndex( _shape ); const TListOfListOfInt& listOfShapeIDList = _mesh.GetMeshOrder(); - TListOfListOfInt::const_iterator listsIt = listOfShapeIDList.begin(); + TListOfListOfInt::const_iterator listsIt = listOfShapeIDList.begin(); for ( ; listsIt != listOfShapeIDList.end(); ++listsIt ) { - const TListOfInt& idList = *listsIt; + const TListOfInt& idList = *listsIt; TListOfInt::const_iterator idIt = std::find( idList.begin(), idList.end(), shapeID ); if ( idIt != idList.end() && *idIt != idList.front() ) { - for ( ; idIt != idList.end(); --idIt ) + for ( --idIt; true; --idIt ) { const TopoDS_Shape& shape = _mesh.GetMeshDS()->IndexToShape( *idIt ); if ( !shape.IsNull()) _preferableShapes.Add( shape ); + + if ( idIt == idList.begin() ) + break; } } } diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index 0c08a7cee..3a21a0a31 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -78,6 +78,7 @@ int SMESH_Hypothesis::GetDim() const case ALGO_1D: dim = 1; break; case ALGO_2D: dim = 2; break; case ALGO_3D: dim = 3; break; + case ALGO_0D: dim = 0; break; case PARAM_ALGO: dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break; } @@ -159,7 +160,7 @@ void SMESH_Hypothesis::SetLibName(const char* theLibName) SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id) { StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); - map::iterator itm = itm = myStudyContext->mapMesh.begin(); + map::iterator itm = myStudyContext->mapMesh.begin(); for ( ; itm != myStudyContext->mapMesh.end(); itm++) { SMESH_Mesh* mesh = (*itm).second; diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 9e613c121..ca3674ef8 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -2010,7 +2010,7 @@ SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exce bool SMESH_Mesh::SynchronizeGroups() { - int nbGroups = _mapGroup.size(); + size_t nbGroups = _mapGroup.size(); const set& groups = _myMeshDS->GetGroups(); set::const_iterator gIt = groups.begin(); for ( ; gIt != groups.end(); ++gIt ) diff --git a/src/SMESH/SMESH_ProxyMesh.cxx b/src/SMESH/SMESH_ProxyMesh.cxx index 9e4ebe913..962ba92a5 100644 --- a/src/SMESH/SMESH_ProxyMesh.cxx +++ b/src/SMESH/SMESH_ProxyMesh.cxx @@ -130,7 +130,7 @@ const SMESHDS_SubMesh* SMESH_ProxyMesh::GetSubMesh(const TopoDS_Shape& shape) co { const SMESHDS_SubMesh* sm = 0; - int i = shapeIndex(shape); + size_t i = shapeIndex(shape); if ( i < _subMeshes.size() ) sm = _subMeshes[i]; if ( !sm ) @@ -148,7 +148,7 @@ const SMESHDS_SubMesh* SMESH_ProxyMesh::GetSubMesh(const TopoDS_Shape& shape) co const SMESH_ProxyMesh::SubMesh* SMESH_ProxyMesh::GetProxySubMesh(const TopoDS_Shape& shape) const { - int i = shapeIndex(shape); + size_t i = shapeIndex(shape); return i < _subMeshes.size() ? _subMeshes[i] : 0; } diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index be6345c93..5bb65b5b3 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1093,8 +1093,6 @@ bool SMESH_subMesh::IsConform(const SMESH_Algo* theAlgo) !theAlgo->OnlyUnaryInput() ) // all adjacent shapes will be meshed by this algo? return true; - SMESH_Gen* gen =_father->GetGen(); - // only local algo is to be checked //if ( gen->IsGlobalHypothesis( theAlgo, *_father )) if ( _subShape.ShapeType() == _father->GetMeshDS()->ShapeToMesh().ShapeType() ) @@ -2465,7 +2463,7 @@ namespace { { _Iterator(SMDS_Iterator* subIt, SMESH_subMesh* prepend, - SMESH_subMesh* append): myIt(subIt),myAppend(append) + SMESH_subMesh* append): myAppend(append), myIt(subIt) { myCur = prepend ? prepend : myIt->more() ? myIt->next() : append; if ( myCur == append ) append = 0; @@ -2570,7 +2568,7 @@ void SMESH_subMesh::ClearAncestors() bool SMESH_subMesh::FindIntersection(const SMESH_subMesh* theOther, std::set& theSetOfCommon ) const { - int oldNb = theSetOfCommon.size(); + size_t oldNb = theSetOfCommon.size(); // check main submeshes const map ::const_iterator otherEnd = theOther->_mapDepend.end(); diff --git a/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx b/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx index eebb42470..289bde732 100644 --- a/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx +++ b/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx @@ -54,7 +54,7 @@ public: } else { - if ( myVec.size() <= id ) + if ( (int)myVec.size() <= id ) myVec.resize( id+1, (SUBMESH*) NULL ); myVec[ id ] = sm; } @@ -68,7 +68,7 @@ public: } else { - return (SUBMESH*) ( id >= myVec.size() ? NULL : myVec[ id ]); + return (SUBMESH*) ( id >= (int)myVec.size() ? NULL : myVec[ id ]); } } void DeleteAll() diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx index 96fca0d9f..8578dbf34 100644 --- a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx @@ -497,6 +497,9 @@ void SMESHGUI_Add0DElemsOnAllNodesOp::onSelTypeChange(int selType) disconnect( myDlg, SIGNAL( objectChanged( int, const QStringList& )), this, SLOT ( onTextChanged( int, const QStringList& ))); + connect( myDlg->myGroupListCmBox, SIGNAL( editTextChanged(const QString & )), + this, SLOT( updateButtons() )); + selectionDone(); } diff --git a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx index 5da5ff109..9f85f5c27 100644 --- a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx @@ -109,8 +109,8 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule ) : QDialog( SMESH::GetDesktop( theModule ) ), mySMESHGUI( theModule ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), - myFilterDlg(0), mySelectedObject(SMESH::SMESH_IDSource::_nil()), + myFilterDlg(0), myIsApplyAndClose( false ) { QPixmap image (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_COPY_MESH"))); diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx index 5af9a3789..dd1f1e684 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx @@ -73,8 +73,8 @@ //================================================================================= SMESHGUI_DeleteGroupDlg::SMESHGUI_DeleteGroupDlg (SMESHGUI* theModule): QDialog(SMESH::GetDesktop(theModule)), - mySelectionMgr(SMESH::GetSelectionMgr(theModule)), - mySMESHGUI(theModule) + mySMESHGUI(theModule), + mySelectionMgr(SMESH::GetSelectionMgr(theModule)) { setModal(false); setWindowTitle(tr("CAPTION")); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 5a62c1de6..38b36d060 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -397,7 +397,7 @@ void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::long_array_var& ids, int iT SMESH::SMESH_IDSource_var idSrc = aMeshEditor->MakeIDSource( ids, SMESH::ElementType( iType+1 )); - if ( myIDSource[ iType ]->length() <= index ) + if ( (int) myIDSource[ iType ]->length() <= index ) myIDSource[ iType ]->length( index + 1 ); myIDSource[ iType ][ index ] = idSrc; diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx index ff6cd8707..9b72ae2f4 100644 --- a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx +++ b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx @@ -170,7 +170,7 @@ bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds() { int nbSelected = 0; if ( myTree->isEnabled() ) - for ( size_t i = 0; i < myTree->topLevelItemCount(); ++i ) + for ( int i = 0; i < myTree->topLevelItemCount(); ++i ) { QTreeWidgetItem* meshItem = myTree->topLevelItem( i ); int iM = meshItem->data( 0, Qt::UserRole ).toInt(); @@ -202,7 +202,7 @@ bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds() } else { - for ( size_t iF = 0; iF < myFields->count(); ++iF ) + for ( int iF = 0; iF < myFields->count(); ++iF ) { GEOM::ListOfFields& fields = (*myFields)[ iF ].first.inout(); fields.length( 0 ); diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx index fc4304500..5b3f1ef27 100644 --- a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx @@ -101,7 +101,7 @@ void SMESHGUI_FindElemByPointDlg::setTypes(SMESH::array_of_ElementType_var & typ myElemTypeCombo->blockSignals(true); myElemTypeCombo->clear(); int nbTypes = 0, hasNodes = 0; - for ( int i = 0; i < types->length(); ++i ) + for ( int i = 0; i < (int) types->length(); ++i ) { switch ( types[i] ) { case SMESH::NODE: @@ -449,7 +449,7 @@ void SMESHGUI_FindElemByPointOp::onFind() myDlg->myZ->GetValue(), SMESH::ElementType( myDlg->myElemTypeCombo->currentId())); myDlg->myFoundList->clear(); - for ( int i = 0; i < foundIds->length(); ++i ) + for ( int i = 0; i < (int) foundIds->length(); ++i ) myDlg->myFoundList->addItem( QString::number( foundIds[i] )); if ( foundIds->length() > 0 ) diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index ad2e6f3f3..62fbba011 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -629,7 +629,7 @@ namespace SMESH { SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aHypObj ) ); SObjectList meshList = GetMeshesUsingAlgoOrHypothesis( hypo ); - for( int i = 0; i < meshList.size(); i++ ) + for( size_t i = 0; i < meshList.size(); i++ ) RemoveHypothesisOrAlgorithmOnMesh( meshList[ i ], hypo ); } } @@ -729,7 +729,7 @@ namespace SMESH QString GetMessageOnAlgoStateErrors(const algo_error_array& errors) { QString resMsg; // PAL14861 = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n"; - for ( int i = 0; i < errors.length(); ++i ) { + for ( size_t i = 0; i < errors.length(); ++i ) { const SMESH::AlgoStateError & error = errors[ i ]; const bool hasAlgo = ( strlen( error.algoName ) != 0 ); QString msg; diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index f594f650d..46e68d346 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -797,11 +797,11 @@ void SMESHGUI_MergeDlg::onDetect() break; } - for (int i = 0; i < aGroupsArray->length(); i++) { + for (int i = 0; i < (int)aGroupsArray->length(); i++) { SMESH::long_array& aGroup = aGroupsArray[i]; QStringList anIDs; - for (int j = 0; j < aGroup.length(); j++) + for (int j = 0; j < (int)aGroup.length(); j++) anIDs.append(QString::number(aGroup[j])); ListCoincident->addItem(anIDs.join(" ")); diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index 38314468f..50fe4e592 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -173,7 +173,7 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD vtkPoints* aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNodesXYZ.length()); - for ( int i = 0; i < aNodesXYZ.length(); i++ ) { + for ( size_t i = 0; i < aNodesXYZ.length(); i++ ) { aPoints->SetPoint( i, aNodesXYZ[i].x, aNodesXYZ[i].y, aNodesXYZ[i].z ); } myGrid->SetPoints(aPoints); @@ -197,7 +197,7 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD vtkIdList *anIdList = vtkIdList::New(); int aNodePos = 0; - for ( int i = 0; i < anElemTypes.length(); i++ ) { + for ( size_t i = 0; i < anElemTypes.length(); i++ ) { const SMESH::ElementSubType& anElementSubType = anElemTypes[i]; SMDSAbs_ElementType aType = SMDSAbs_ElementType(anElementSubType.SMDS_ElementType); vtkIdType aNbNodes = anElementSubType.nbNodesInElement; @@ -299,7 +299,7 @@ void SMESHGUI_MeshEditPreview::SetArrowShapeAndNb( int nbArrows, myLabelActors.resize( nbArrows, ( vtkTextActor*) NULL ); char label[] = "X"; if ( labels ) - for ( int iP = 0, iA = 0; iA < nbArrows; ++iA ) + for ( int iA = 0; iA < nbArrows; ++iA ) { label[0] = labels[iA]; vtkTextMapper* text = vtkTextMapper::New(); @@ -333,7 +333,7 @@ void SMESHGUI_MeshEditPreview::SetArrows( const gp_Ax1* axes, { vtkPoints* aPoints = myGrid->GetPoints(); - for ( int iP = 0, iA = 0; iA < myLabelActors.size(); ++iA ) + for ( int iP = 0, iA = 0; iA < (int) myLabelActors.size(); ++iA ) { gp_Trsf trsf; trsf.SetTransformation( gp_Ax3( axes[iA].Location(), axes[iA].Direction() ), gp::XOY() ); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index f123ea17e..d598d95e9 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -112,8 +112,8 @@ SMESHGUI_MultiEditDlg const bool the3d2d, bool theDoInit): SMESHGUI_PreviewDlg(theModule), - mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySelectionMgr(SMESH::GetSelectionMgr(theModule)), + mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySMESHGUI(theModule) { setModal(false); @@ -1572,7 +1572,6 @@ SMESHGUI_SplitVolumesDlg::SMESHGUI_SplitVolumesDlg(SMESHGUI* theModule) QLabel* dXLbl = new QLabel( tr("SMESH_DX"), myFacetSelGrp); QLabel* dYLbl = new QLabel( tr("SMESH_DY"), myFacetSelGrp); QLabel* dZLbl = new QLabel( tr("SMESH_DZ"), myFacetSelGrp); - QPushButton* axisBtn[3]; for ( int i = 0; i < 3; ++i ) { myPointSpin[i] = new SMESHGUI_SpinBox( myFacetSelGrp ); @@ -1983,7 +1982,7 @@ void SMESHGUI_SplitVolumesDlg::onSetDir() if ( sender() == myAxisBtn[i] ) break; if ( i == 3 ) - i == 0; + i = 0; myDirSpin[i]->SetValue(1.); if ( myActor && !myMesh->_is_nil() && myMesh->NbNodes() > 0 ) diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index e163699d4..5a2cf87b8 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -230,8 +230,8 @@ namespace SMESH //================================================================================= SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ): QDialog( SMESH::GetDesktop( theModule ) ), - mySelector( SMESH::GetViewWindow( theModule )->GetSelector() ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), + mySelector( SMESH::GetViewWindow( theModule )->GetSelector() ), mySMESHGUI( theModule ) { setModal( false ); diff --git a/src/SMESHGUI/SMESHGUI_PreviewDlg.cxx b/src/SMESHGUI/SMESHGUI_PreviewDlg.cxx index d466dedf3..8dc5f52c9 100644 --- a/src/SMESHGUI/SMESHGUI_PreviewDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_PreviewDlg.cxx @@ -45,8 +45,8 @@ // purpose : //================================================================================= SMESHGUI_PreviewDlg::SMESHGUI_PreviewDlg(SMESHGUI* theModule) : - mySMESHGUI(theModule), QDialog(SMESH::GetDesktop( theModule )), + mySMESHGUI(theModule), myIsApplyAndClose( false ) { mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI )); @@ -151,8 +151,8 @@ void SMESHGUI_PreviewDlg::onOpenView() // purpose : //================================================================================= SMESHGUI_MultiPreviewDlg::SMESHGUI_MultiPreviewDlg( SMESHGUI* theModule ) : - mySMESHGUI( theModule ), QDialog( SMESH::GetDesktop( theModule ) ), + mySMESHGUI( theModule ), myIsApplyAndClose( false ) { mySimulationList.clear(); diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx index 1decdeff6..a8cdcb1ea 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx @@ -80,8 +80,8 @@ SMESHGUI_RemoveElementsDlg ::SMESHGUI_RemoveElementsDlg(SMESHGUI* theModule) : QDialog(SMESH::GetDesktop(theModule)), - mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySelectionMgr(SMESH::GetSelectionMgr(theModule)), + mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySMESHGUI(theModule), myBusy(false), myFilterDlg(0) diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx index 5baaf4dc2..8b9ab2e55 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx @@ -81,8 +81,8 @@ SMESHGUI_RemoveNodesDlg ::SMESHGUI_RemoveNodesDlg(SMESHGUI* theModule) : QDialog(SMESH::GetDesktop(theModule)), - mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySelectionMgr(SMESH::GetSelectionMgr(theModule)), + mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySMESHGUI(theModule), myBusy(false), myFilterDlg(0) diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index a91586798..82a7a0451 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -612,9 +612,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument() if ( !aMesh ) return; - int aNbUnits = 0; - - bool isNodeSelected = (myEditCurrentArgument == (QWidget*)SpinBox_X || + bool isNodeSelected = ((myEditCurrentArgument == (QWidget*)SpinBox_X ) || (myEditCurrentArgument == (QWidget*)SpinBox_DX && myVectorDefinition==POINT_SELECT)); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 3661fa853..fa6f4c386 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -474,7 +474,7 @@ int SMESHGUI_Selection::dim( int ind ) const if ( !CORBA::is_nil( idSrc ) ) { SMESH::array_of_ElementType_var types = idSrc->GetTypes(); - for ( int i = 0; i < types->length(); ++ i) { + for ( size_t i = 0; i < types->length(); ++ i) { switch ( types[i] ) { case SMESH::EDGE : dim = std::max( dim, 1 ); break; case SMESH::FACE : dim = std::max( dim, 2 ); break; diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index 2ed7c0271..e40b5b4d1 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -93,8 +93,8 @@ private: SMESHGUI_SingleEditDlg ::SMESHGUI_SingleEditDlg(SMESHGUI* theModule) : QDialog(SMESH::GetDesktop(theModule)), - mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySelectionMgr(SMESH::GetSelectionMgr(theModule)), + mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySMESHGUI(theModule) { setModal(false); diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index d752a128a..30c98a6aa 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -111,8 +111,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule ) : QDialog( SMESH::GetDesktop( theModule ) ), mySMESHGUI( theModule ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), - myFilterDlg(0), - mySelectedObject(SMESH::SMESH_IDSource::_nil()) + mySelectedObject(SMESH::SMESH_IDSource::_nil()), + myFilterDlg(0) { QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING"))); QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT"))); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index 7cc3006b8..1b484b5b3 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -815,46 +815,8 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument() if ( myObjects.isEmpty() ) return; // get IDs from mesh - /* - SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh(); - if (!aSMDSMesh) - return; - - for (int i = aSMDSMesh->MinElementID(); i <= aSMDSMesh->MaxElementID(); i++) { - const SMDS_MeshElement * e = aSMDSMesh->FindElement(i); - if (e) { - myElementsId += QString(" %1").arg(i); - aNbUnits++; - } - } - } else if (!SMESH::IObjectToInterface(IO)->_is_nil()) { //SUBMESH - // get submesh - SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface(IO); - - // get IDs from submesh - /* - SMESH::long_array_var anElementsIds = new SMESH::long_array; - anElementsIds = aSubMesh->GetElementsId(); - for (int i = 0; i < anElementsIds->length(); i++) { - myElementsId += QString(" %1").arg(anElementsIds[i]); - } - aNbUnits = anElementsIds->length(); - } else { // GROUP - // get smesh group - SMESH::SMESH_GroupBase_var aGroup = - SMESH::IObjectToInterface(IO); - if (aGroup->_is_nil()) - return; - - // get IDs from smesh group - SMESH::long_array_var anElementsIds = new SMESH::long_array; - anElementsIds = aGroup->GetListOfID(); - for (int i = 0; i < anElementsIds->length(); i++) { - myElementsId += QString(" %1").arg(anElementsIds[i]); - } - aNbUnits = anElementsIds->length(); - } - */ + // get IDs from submesh + // get IDs from smesh group } else { aNbUnits = SMESH::GetNameOfSelectedElements( mySelector, aList.First(), aString); myElementsId = aString; diff --git a/src/SMESHGUI/SMESHGUI_Utils.h b/src/SMESHGUI/SMESHGUI_Utils.h index 51d763492..6f024242f 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.h +++ b/src/SMESHGUI/SMESHGUI_Utils.h @@ -195,7 +195,7 @@ SMESHGUI_EXPORT class toStrT : public _STRING { CORBA::String_var myStr; public: - toStrT( char* s ): myStr(s), _STRING( s ) + toStrT( char* s ): _STRING( s ), myStr(s) {} operator const char*() const { return myStr.in(); } diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx index 946c200df..24c054636 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -535,7 +535,7 @@ namespace // internal utils for ( int i = 0; i < 3; ++i ) { const gp_Pnt& pn = myNodes->Value(n[i]); - if ( avoidTria = ( pn.SquareDistance( *avoidPnt ) <= tol2 )) + if (( avoidTria = ( pn.SquareDistance( *avoidPnt ) <= tol2 ))) break; if ( !projectedOnly ) minD2 = Min( minD2, pn.SquareDistance( p )); @@ -1505,7 +1505,7 @@ bool AdaptiveAlgo::Evaluate(SMESH_Mesh & theMesh, for ( ; edExp.More(); edExp.Next() ) { - const TopoDS_Edge & edge = TopoDS::Edge( edExp.Current() ); + //const TopoDS_Edge & edge = TopoDS::Edge( edExp.Current() ); StdMeshers_Regular_1D::Evaluate( theMesh, theShape, theResMap ); } return true; diff --git a/src/StdMeshers/StdMeshers_Arithmetic1D.cxx b/src/StdMeshers/StdMeshers_Arithmetic1D.cxx index 3bf1f1be5..2642dd1af 100644 --- a/src/StdMeshers/StdMeshers_Arithmetic1D.cxx +++ b/src/StdMeshers/StdMeshers_Arithmetic1D.cxx @@ -155,7 +155,7 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load) isOK = (load >> intVal); if (isOK && intVal > 0) { _edgeIDs.reserve( intVal ); - for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { + for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) { isOK = (load >> intVal); if ( isOK ) _edgeIDs.push_back( intVal ); } @@ -167,7 +167,7 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load) //============================================================================= /*! - * + * */ //============================================================================= diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx index 7c9dca548..cc27b86d7 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx @@ -62,9 +62,7 @@ #ifdef _DEBUG_ // #define DEB_FACES // #define DEB_GRID -// #define DUMP_VERT(msg,V) \ -// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); \ -// cout << msg << "( "<< p.X()<<", "< 0) { _params.clear(); _params.reserve( intVal ); - for (int i = 0; i < _params.capacity() && isOK; i++) { + for ( size_t i = 0; i < _params.capacity() && isOK; i++) { isOK = (load >> dblVal); if ( isOK ) _params.push_back( dblVal ); } @@ -164,7 +164,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) if (isOK && intVal > 0) { _nbsegs.clear(); _nbsegs.reserve( intVal ); - for (int i = 0; i < _nbsegs.capacity() && isOK; i++) { + for ( size_t i = 0; i < _nbsegs.capacity() && isOK; i++) { isOK = (load >> intVal); if ( isOK ) _nbsegs.push_back( intVal ); } @@ -174,7 +174,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) if (isOK && intVal > 0) { _edgeIDs.clear(); _edgeIDs.reserve( intVal ); - for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { + for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) { isOK = (load >> intVal); if ( isOK ) _edgeIDs.push_back( intVal ); } diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 1ad459448..87f1aa8d7 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -444,8 +444,8 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, { aCubeSide[i]._columns.resize( aCubeSide[i]._u2nodesMap.size() ); - int iFwd = 0, iRev = aCubeSide[i]._columns.size()-1; - int* pi = isReverse[i] ? &iRev : &iFwd; + size_t iFwd = 0, iRev = aCubeSide[i]._columns.size()-1; + size_t* pi = isReverse[i] ? &iRev : &iFwd; TParam2ColumnMap::iterator u2nn = aCubeSide[i]._u2nodesMap.begin(); for ( ; iFwd < aCubeSide[i]._columns.size(); --iRev, ++iFwd, ++u2nn ) aCubeSide[i]._columns[ *pi ].swap( u2nn->second ); diff --git a/src/StdMeshers/StdMeshers_Import_1D.cxx b/src/StdMeshers/StdMeshers_Import_1D.cxx index 083f055f2..f53b60ede 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D.cxx @@ -685,7 +685,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th // import edges from groups TNodeNodeMap* n2n; TElemElemMap* e2e; - for ( int iG = 0; iG < srcGroups.size(); ++iG ) + for ( size_t iG = 0; iG < srcGroups.size(); ++iG ) { const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); @@ -711,7 +711,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th double mytol = a.Distance(edge->GetNode(edge->NbNodes()-1))/25; //mytol = max(1.E-5, 10*edgeTol); // too strict and not necessary //MESSAGE("mytol = " << mytol); - for ( unsigned i = 0; i < newNodes.size(); ++i, ++node ) + for ( size_t i = 0; i < newNodes.size(); ++i, ++node ) { TNodeNodeMap::iterator n2nIt = n2n->insert( make_pair( *node, (SMDS_MeshNode*)0 )).first; if ( n2nIt->second ) @@ -810,7 +810,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th // copy meshes vector srcMeshes = _sourceHyp->GetSourceMeshes(); - for ( unsigned i = 0; i < srcMeshes.size(); ++i ) + for ( size_t i = 0; i < srcMeshes.size(); ++i ) importMesh( srcMeshes[i], theMesh, _sourceHyp, theShape ); return true; @@ -873,7 +873,7 @@ void StdMeshers_Import_1D::importMesh(const SMESH_Mesh* srcMesh, (*e2eIt).second = newElem; } // copy free nodes - if ( srcMeshDS->NbNodes() > n2n->size() ) + if ( srcMeshDS->NbNodes() > (int) n2n->size() ) { SMDS_NodeIteratorPtr nIt = srcMeshDS->nodesIterator(); while( nIt->more() ) @@ -1028,7 +1028,7 @@ bool StdMeshers_Import_1D::Evaluate(SMESH_Mesh & theMesh, // count edges imported from groups int nbEdges = 0, nbQuadEdges = 0; - for ( int iG = 0; iG < srcGroups.size(); ++iG ) + for ( size_t iG = 0; iG < srcGroups.size(); ++iG ) { const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); SMDS_ElemIteratorPtr srcElems = srcGroup->GetElements(); @@ -1057,7 +1057,7 @@ bool StdMeshers_Import_1D::Evaluate(SMESH_Mesh & theMesh, } SMESH_subMesh * sm = theMesh.GetSubMesh(theShape); - aResMap.insert(make_pair(sm,aVec)); + aResMap.insert( make_pair( sm, aVec )); return true; } diff --git a/src/StdMeshers/StdMeshers_Import_1D2D.cxx b/src/StdMeshers/StdMeshers_Import_1D2D.cxx index 60b776254..df7f8c065 100644 --- a/src/StdMeshers/StdMeshers_Import_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D2D.cxx @@ -824,7 +824,7 @@ bool StdMeshers_Import_1D2D::Evaluate(SMESH_Mesh & theMesh, set allNodes; gp_XY uv; double minGroupTol = 1e100; - for ( int iG = 0; iG < srcGroups.size(); ++iG ) + for ( size_t iG = 0; iG < srcGroups.size(); ++iG ) { const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); const double groupTol = 0.5 * sqrt( getMinElemSize2( srcGroup )); diff --git a/src/StdMeshers/StdMeshers_LocalLength.cxx b/src/StdMeshers/StdMeshers_LocalLength.cxx index c5c824e18..ea14e8126 100644 --- a/src/StdMeshers/StdMeshers_LocalLength.cxx +++ b/src/StdMeshers/StdMeshers_LocalLength.cxx @@ -224,7 +224,7 @@ bool StdMeshers_LocalLength::SetParametersByMesh(const SMESH_Mesh* theMesh, SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS(); if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params )) { - for ( int i = 1; i < params.size(); ++i ) + for ( size_t i = 1; i < params.size(); ++i ) _length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]); nbEdges += params.size() - 1; } diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx index 264189170..e7daf5ace 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx @@ -587,7 +587,7 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector & wires, F = TopoDS::Face( _helper->GetSubShape() ); TopExp::MapShapesAndAncestors( F, TopAbs_VERTEX, TopAbs_WIRE, VWMap ); int nbVertices = 0; - for ( int iW = 0; iW < wires.size(); ++iW ) + for ( size_t iW = 0; iW < wires.size(); ++iW ) nbVertices += wires[ iW ]->NbEdges(); if ( nbVertices == VWMap.Extent() ) VWMap.Clear(); // wires have no common vertices @@ -595,10 +595,10 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector & wires, int m = 0; - for ( int iW = 0; iW < wires.size(); ++iW ) + for ( size_t iW = 0; iW < wires.size(); ++iW ) { const vector& uvPtVec = wires[ iW ]->GetUVPtStruct(); - if ( uvPtVec.size() != wires[ iW ]->NbPoints() ) { + if ((int) uvPtVec.size() != wires[ iW ]->NbPoints() ) { return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Unexpected nb of points on wire ") << iW << ": " << uvPtVec.size()<<" != "<NbPoints() << ", probably because of invalid node parameters on geom edges"); diff --git a/src/StdMeshers/StdMeshers_MaxLength.cxx b/src/StdMeshers/StdMeshers_MaxLength.cxx index 0e7e9f617..3d5529940 100644 --- a/src/StdMeshers/StdMeshers_MaxLength.cxx +++ b/src/StdMeshers/StdMeshers_MaxLength.cxx @@ -213,7 +213,7 @@ bool StdMeshers_MaxLength::SetParametersByMesh(const SMESH_Mesh* theMesh, SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS(); if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params )) { - for ( int i = 1; i < params.size(); ++i ) + for ( size_t i = 1; i < params.size(); ++i ) _length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]); nbEdges += params.size() - 1; } diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index 6d99a44de..bb4f491b1 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -674,7 +674,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh() int nbFaceNodes = pE0->NbNodes(); if(myCreateQuadratic) nbFaceNodes = nbFaceNodes/2; - if ( aN.size() < nbFaceNodes * 2 ) + if ( (int) aN.size() < nbFaceNodes * 2 ) aN.resize( nbFaceNodes * 2 ); // for ( k=0; kNbNodes(); if(myCreateQuadratic) aNbNodes = aNbNodes/2; - if ( aNodes1.size() < aNbNodes ) + if ( (int) aNodes1.size() < aNbNodes ) aNodes1.resize( aNbNodes ); // k = aNbNodes-1; // reverse a face @@ -1476,7 +1476,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, nVec.resize( vsize, nullNode ); loadedNodes.insert( nVec[ 0 ] = node ); } - if ( theIJNodes.size() != hsize ) { + if ( (int) theIJNodes.size() != hsize ) { MESSAGE( "Wrong node positions on theBaseEdge" ); return false; } diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 6e58555e1..e2330e95e 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -71,8 +71,7 @@ using namespace std; #ifdef _DEBUG_ #define DBGOUT(msg) //cout << msg << endl; #define SHOWYXZ(msg, xyz) \ - // { gp_Pnt p (xyz); \ - // cout << msg << " ("<< p.X() << "; " <X(),n->Y(),n->Z()) -#define SHOWYXZ(msg, xyz) // {\ -// gp_Pnt p (xyz); \ -// cout << msg << " ("<< p.X() << "; " < edgeIdVec; SMESH_Block::GetFaceEdgesIDs( fId, edgeIdVec ); - for ( int i = 0; i < edgeIdVec.size(); ++i ) { + for ( size_t i = 0; i < edgeIdVec.size(); ++i ) { int eID = edgeIdVec[ i ]; shape2ShapeMap.Bind( scrShapes( eID ), tgtShapes( eID )); if ( i < 2 ) { diff --git a/src/StdMeshers/StdMeshers_Propagation.cxx b/src/StdMeshers/StdMeshers_Propagation.cxx index 5a6c9ade0..bf67b7a0a 100644 --- a/src/StdMeshers/StdMeshers_Propagation.cxx +++ b/src/StdMeshers/StdMeshers_Propagation.cxx @@ -304,7 +304,7 @@ namespace { // Get ordered edges and find index of anE in a sequence edges.clear(); BRepTools_WireExplorer aWE (TopoDS::Wire(itA.Value())); - int edgeIndex = 0; + size_t edgeIndex = 0; for (; aWE.More(); aWE.Next()) { TopoDS_Edge edge = aWE.Current(); edge.Orientation( aWE.Orientation() ); @@ -325,8 +325,8 @@ namespace { else { // count nb sides TopoDS_Edge prevEdge = anE; - int nbSide = 0, eIndex = edgeIndex + 1; - for ( int i = 0; i < edges.size(); ++i, ++eIndex ) + size_t nbSide = 0, eIndex = edgeIndex + 1; + for ( size_t i = 0; i < edges.size(); ++i, ++eIndex ) { if ( eIndex == edges.size() ) eIndex = 0; @@ -633,7 +633,11 @@ namespace { } return; } + case MEANINGLESS_LAST: { + break; + } } // switch by SubMeshState - } + + } // ProcessEvent() } // namespace diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index a9b924724..8bf7d6ac2 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -949,7 +949,7 @@ namespace { const SMDS_MeshNode* _node; double _u; - int _edgeInd; // index in theSinuEdges vector + size_t _edgeInd; // index in theSinuEdges vector NodePoint(): _node(0), _u(0), _edgeInd(-1) {} NodePoint(const SMDS_MeshNode* n, double u, size_t iEdge ): _node(n), _u(u), _edgeInd(iEdge) {} @@ -1251,8 +1251,8 @@ namespace const vector& theSinuEdges = theSinuFace._sinuEdges; const vector< Handle(Geom_Curve) >& curves = theSinuFace._sinuCurves; - SMESH_MAT2d::BoundaryPoint bp[2]; - const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0); + //SMESH_MAT2d::BoundaryPoint bp[2]; + //const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0); typedef TMAPar2NPoints::iterator TIterator; @@ -1292,7 +1292,7 @@ namespace { // find an existing node on VERTEX among sameU2NP and get underlying EDGEs const SMDS_MeshNode* existingNode = 0; - set< int > edgeInds; + set< size_t > edgeInds; NodePoint* np; for ( size_t i = 0; i < sameU2NP.size(); ++i ) { @@ -1309,7 +1309,7 @@ namespace if ( u2NPprev->first < 0. ) ++u2NPprev; if ( u2NPnext->first > 1. ) --u2NPnext; - set< int >::iterator edgeID = edgeInds.begin(); + set< size_t >::iterator edgeID = edgeInds.begin(); for ( ; edgeID != edgeInds.end(); ++edgeID ) { // get U range on iEdge within which the equal points will be distributed @@ -1844,12 +1844,12 @@ namespace const double dksi = 0.5, deta = 0.5; const double dksi2 = dksi*dksi, deta2 = deta*deta; double err = 0., g11, g22, g12; - int nbErr = 0; + //int nbErr = 0; FaceQuadStruct& q = *quad; UVPtStruct pNew; - double refArea = area( q.UVPt(0,0), q.UVPt(1,0), q.UVPt(1,1) ); + //double refArea = area( q.UVPt(0,0), q.UVPt(1,0), q.UVPt(1,1) ); for ( int iLoop = 0; iLoop < nbLoops; ++iLoop ) { diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index f7ac411d9..a3bf670cb 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -132,8 +132,7 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis myParams = NULL; myQuadList.clear(); - bool isOk = true; - aStatus = SMESH_Hypothesis::HYP_OK; + aStatus = SMESH_Hypothesis::HYP_OK; const list & hyps = GetUsedHypothesis(aMesh, aShape, false); @@ -4219,7 +4218,7 @@ bool StdMeshers_Quadrangle_2D::check() return isOK; } -/*//================================================================================ +//================================================================================ /*! * \brief Finds vertices at the most sharp face corners * \param [in] theFace - the FACE @@ -4604,7 +4603,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, //================================================================================ FaceQuadStruct::Side::Side(StdMeshers_FaceSidePtr theGrid) - : grid(theGrid), nbNodeOut(0), from(0), to(theGrid ? theGrid->NbPoints() : 0 ), di(1) + : grid(theGrid), from(0), to(theGrid ? theGrid->NbPoints() : 0 ), di(1), nbNodeOut(0) { } diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 73f11aff5..c414e51f4 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -713,7 +713,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, size_t iSeg = theReverse ? segLen.size()-1 : 0; size_t dSeg = theReverse ? -1 : +1; double param = theFirstU; - int nbParams = 0; + size_t nbParams = 0; for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg ) { GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param ); @@ -988,9 +988,9 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, case FIXED_POINTS_1D: { const std::vector& aPnts = _fpHyp->GetPoints(); const std::vector& nbsegs = _fpHyp->GetNbSegments(); - int i = 0; TColStd_SequenceOfReal Params; - for(; i0.9999 ) continue; int j=1; bool IsExist = false; @@ -1014,8 +1014,9 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, } double eltSize, segmentSize = 0.; double currAbscissa = 0; - for(i=0; i nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i]; + for ( int i = 0; i < Params.Length(); i++ ) + { + int nbseg = ( i > (int)nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i]; segmentSize = Params.Value(i+1)*theLength - currAbscissa; currAbscissa += segmentSize; GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1); @@ -1052,7 +1053,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, par1 = par2; } // add for last - int nbseg = ( nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0]; + int nbseg = ( (int)nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0]; segmentSize = theLength - currAbscissa; eltSize = segmentSize/nbseg; GCPnts_UniformAbscissa Discret; diff --git a/src/StdMeshers/StdMeshers_StartEndLength.cxx b/src/StdMeshers/StdMeshers_StartEndLength.cxx index c667ce38a..dffe92e9a 100644 --- a/src/StdMeshers/StdMeshers_StartEndLength.cxx +++ b/src/StdMeshers/StdMeshers_StartEndLength.cxx @@ -153,11 +153,11 @@ istream & StdMeshers_StartEndLength::LoadFrom(istream & load) if (!isOK) load.clear(ios::badbit | load.rdstate()); - + isOK = (load >> intVal); if (isOK && intVal > 0) { _edgeIDs.reserve( intVal ); - for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { + for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) { isOK = (load >> intVal); if ( isOK ) _edgeIDs.push_back( intVal ); } @@ -169,7 +169,7 @@ istream & StdMeshers_StartEndLength::LoadFrom(istream & load) //============================================================================= /*! - * + * */ //============================================================================= diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx index 3c1841e7b..56613b351 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx @@ -817,7 +817,7 @@ bool _ViscousBuilder2D::findEdgesWithLayers() { hasVL = false; for ( hyp = allHyps.begin(); hyp != allHyps.end() && !hasVL; ++hyp ) - if ( viscHyp = dynamic_cast( *hyp )) + if (( viscHyp = dynamic_cast( *hyp ))) hasVL = viscHyp->IsShapeWithLayers( neighbourID ); } if ( !hasVL ) @@ -1438,7 +1438,7 @@ bool _ViscousBuilder2D::inflate() _PolyLine::TEdgeIterator eIt = isR ? L._lEdges.end()-1 : L._lEdges.begin(); if ( eIt->_length2D == 0 ) continue; _Segment seg1( eIt->_uvOut, eIt->_uvIn ); - for ( eIt += deltaIt; nbRemove < L._lEdges.size()-1; eIt += deltaIt ) + for ( eIt += deltaIt; nbRemove < (int)L._lEdges.size()-1; eIt += deltaIt ) { _Segment seg2( eIt->_uvOut, eIt->_uvIn ); if ( !intersection.Compute( seg1, seg2 )) @@ -1446,7 +1446,7 @@ bool _ViscousBuilder2D::inflate() ++nbRemove; } if ( nbRemove > 0 ) { - if ( nbRemove == L._lEdges.size()-1 ) // 1st and last _LayerEdge's intersect + if ( nbRemove == (int)L._lEdges.size()-1 ) // 1st and last _LayerEdge's intersect { --nbRemove; _LayerEdge& L0 = L._lEdges.front(); @@ -2131,7 +2131,7 @@ bool _ViscousBuilder2D::refine() // store a proxyMesh in a sub-mesh // make faces on each _PolyLine vector< double > layersHeight; - double prevLen2D = -1; + //double prevLen2D = -1; for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL ) { _PolyLine& L = _polyLineVec[ iL ]; @@ -2669,7 +2669,7 @@ _SegmentTree::box_type* _SegmentTree::buildRootBox() void _SegmentTree::buildChildrenData() { - for ( int i = 0; i < _segments.size(); ++i ) + for ( size_t i = 0; i < _segments.size(); ++i ) for (int j = 0; j < nbChildren(); j++) if ( !myChildren[j]->getBox()->IsOut( *_segments[i]._seg->_uv[0], *_segments[i]._seg->_uv[1] )) @@ -2680,7 +2680,7 @@ void _SegmentTree::buildChildrenData() for (int j = 0; j < nbChildren(); j++) { _SegmentTree* child = static_cast<_SegmentTree*>( myChildren[j]); - child->myIsLeaf = ( child->_segments.size() <= maxNbSegInLeaf() ); + child->myIsLeaf = ((int) child->_segments.size() <= maxNbSegInLeaf() ); } } @@ -2698,7 +2698,7 @@ void _SegmentTree::GetSegmentsNear( const _Segment& seg, if ( isLeaf() ) { - for ( int i = 0; i < _segments.size(); ++i ) + for ( size_t i = 0; i < _segments.size(); ++i ) if ( !_segments[i].IsOut( seg )) found.push_back( _segments[i]._seg ); } @@ -2724,7 +2724,7 @@ void _SegmentTree::GetSegmentsNear( const gp_Ax2d& ray, if ( isLeaf() ) { - for ( int i = 0; i < _segments.size(); ++i ) + for ( size_t i = 0; i < _segments.size(); ++i ) if ( !_segments[i].IsOut( ray )) found.push_back( _segments[i]._seg ); } diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx index fa4eb1dcc..4450986fd 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx @@ -300,7 +300,7 @@ QString StdMeshersGUI_NbSegmentsCreator::storeParams() const case TabFunc : { //valStr += tr("SMESH_TAB_FUNC"); bool param = true; - for( int i=0; i < data.myTable.length(); i++, param = !param ) { + for( size_t i=0; i < data.myTable.length(); i++, param = !param ) { if ( param ) valStr += "["; valStr += QString::number( data.myTable[ i ]); diff --git a/src/StdMeshersGUI/StdMeshersGUI_PropagationHelperWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_PropagationHelperWdg.cxx index c84b40be9..617f5cbfa 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_PropagationHelperWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_PropagationHelperWdg.cxx @@ -379,7 +379,7 @@ std::vector< int > * StdMeshersGUI_PropagationHelperWdg::getSelectedChain() std::vector< int > * chain = 0; if ( QListWidgetItem * item = myListWidget->currentItem() ) { - int i = item->data( Qt::UserRole ).toInt(); + size_t i = (size_t) item->data( Qt::UserRole ).toInt(); if ( 0 <= i && i < myChains.size() ) chain = & myChains[i]; } diff --git a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx index c52f3602a..b1112e786 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx @@ -215,7 +215,7 @@ void StdMeshersGUI_QuadrangleParamCreator::retrieveParams() const GEOM::ListOfGO_var shapes; SMESH::nodes_array_var points; h->GetEnforcedNodes( shapes, points ); - for ( int i = 0; i < shapes->length(); ++i ) + for ( size_t i = 0; i < shapes->length(); ++i ) { CORBA::String_var name = shapes[i]->GetName(); CORBA::String_var entry = shapes[i]->GetStudyEntry(); @@ -223,7 +223,7 @@ void StdMeshersGUI_QuadrangleParamCreator::retrieveParams() const item->setData( Qt::UserRole, entry.in() ); myShapesList->addItem( item ); } - for ( int i = 0; i < points->length(); ++i ) + for ( size_t i = 0; i < points->length(); ++i ) { QTreeWidgetItem* item = new QTreeWidgetItem ( QStringList() diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 66da7722e..b5d7629f7 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -72,8 +72,8 @@ StdMeshersGUI_SubShapeSelectorWdg ::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent, TopAbs_ShapeEnum aSubShType ): QWidget( parent ), - myPreviewActor( 0 ), - myMaxSize( -1 ) + myMaxSize( -1 ), + myPreviewActor( 0 ) { QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) ); diff --git a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx index e5bc43681..96f16c5e4 100644 --- a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx @@ -225,7 +225,7 @@ SMESH::long_array* StdMeshers_Arithmetic1D_i::GetReversedEdges() SMESH::long_array_var anArray = new SMESH::long_array; std::vector ids = this->GetImpl()->GetReversedEdges(); anArray->length( ids.size() ); - for ( CORBA::Long i = 0; i < ids.size(); i++) + for ( CORBA::ULong i = 0; i < ids.size(); i++) anArray [ i ] = ids [ i ]; return anArray._retn(); diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx index bedb2277e..48530d600 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx @@ -38,8 +38,8 @@ StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i (PortableServer::POA_ptr thePOA, int theStudyId, ::SMESH_Gen* theGenImpl ) -: StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl), - SMESH_Hypothesis_i( thePOA ) +:SMESH_Hypothesis_i( thePOA ), + StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl) { MESSAGE( "StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i" ); myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(), diff --git a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx index 6e1f2e974..286396297 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx @@ -38,8 +38,8 @@ StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i (PortableServer::POA_ptr thePOA, int theStudyId, ::SMESH_Gen* theGenImpl) -: StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl), - SMESH_Hypothesis_i( thePOA ) + :SMESH_Hypothesis_i( thePOA ), + StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl) { MESSAGE("StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i"); myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(), diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx index c9047fb7a..0033badf7 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx @@ -397,8 +397,7 @@ void StdMeshers_NumberOfSegments_i::SetExpressionFunction(const char* expr) SMESH::TPythonDump() << _this() << ".SetExpressionFunction( '" << expr << "' )"; } catch ( SALOME_Exception& S_ex ) { - THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), - SALOME::BAD_PARAM ); + THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM ); } } diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx index 9a71ba6ca..13e86c06a 100644 --- a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx @@ -123,7 +123,7 @@ SMESH::long_array* StdMeshers_Reversible1D_i::GetReversedEdges() SMESH::long_array_var anArray = new SMESH::long_array; std::vector ids = this->GetImpl()->GetReversedEdges(); anArray->length( ids.size() ); - for ( CORBA::Long i = 0; i < ids.size(); i++) + for ( CORBA::ULong i = 0; i < ids.size(); i++) anArray [ i ] = ids [ i ]; return anArray._retn(); diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx index 7586394d3..b73eab39b 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx @@ -223,7 +223,7 @@ SMESH::long_array* StdMeshers_StartEndLength_i::GetReversedEdges() SMESH::long_array_var anArray = new SMESH::long_array; std::vector ids = this->GetImpl()->GetReversedEdges(); anArray->length( ids.size() ); - for ( CORBA::Long i = 0; i < ids.size(); i++) + for ( CORBA::ULong i = 0; i < ids.size(); i++) anArray [ i ] = ids [ i ]; return anArray._retn(); -- 2.30.2