From: eap Date: Fri, 12 Mar 2021 16:14:26 +0000 (+0300) Subject: Remove some warnings and fix indentation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bfa9ca6ac69b4e1579629e37d63a02b7290b7838;p=modules%2Fsmesh.git Remove some warnings and fix indentation --- diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 29084166d..21f5bdcd9 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -230,12 +230,12 @@ module SMESH enum DriverMED_ReadStatus // in the order of severity { DRS_OK, - DRS_EMPTY, // a file contains no mesh with the given name - DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers, - // so the numbers from the file are ignored - DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data + DRS_EMPTY, // a file contains no mesh with the given name + DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers, + // so the numbers from the file are ignored + DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity - DRS_FAIL // general failure (exception etc.) + DRS_FAIL // general failure (exception etc.) }; /*! diff --git a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx index da022e638..025eed434 100644 --- a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx @@ -76,7 +76,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform() myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint); } - fprintf(stdout, "%d noeuds\n", myMesh->NbNodes()); + fprintf(stdout, "%ld noeuds\n", myMesh->NbNodes()); /**************************************************************************** * LECTURE DES ELEMENTS * ****************************************************************************/ diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx index 05d4900ef..16ae2bb2d 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx @@ -70,7 +70,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() SCRUTE(nb_of_volumes); //fprintf(stdout, "%d %d\n", nbNodes, nbCells); - fprintf(aFileId, "%d %d\n", nbNodes, nbCells); + fprintf(aFileId, "%ld %ld\n", nbNodes, nbCells); /**************************************************************************** * ECRITURE DES NOEUDS * @@ -107,7 +107,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; - fprintf(aFileId, "%d ", nodeID ); + fprintf(aFileId, "%ld ", nodeID ); } fprintf(aFileId, "\n"); } @@ -123,7 +123,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; - fprintf(aFileId, "%d ", nodeID ); + fprintf(aFileId, "%ld ", nodeID ); } fprintf(aFileId, "\n"); } @@ -158,7 +158,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; - fprintf(aFileId, "%d ", nodeID ); + fprintf(aFileId, "%ld ", nodeID ); } fprintf(aFileId, "\n"); diff --git a/src/DriverGMF/DriverGMF_Read.cxx b/src/DriverGMF/DriverGMF_Read.cxx index d56e54743..b70f6a33c 100644 --- a/src/DriverGMF/DriverGMF_Read.cxx +++ b/src/DriverGMF/DriverGMF_Read.cxx @@ -273,14 +273,14 @@ Driver_Mesh::Status DriverGMF_Read::Perform() for ( int i = 1; i <= nbTet; ++i ) { GmfGetLin(meshID, GmfTetrahedra, &iN[0], &iN[1], &iN[2], &iN[3], &ref); - std::vector& midN = quadNodesAtTetrahedra[ i ]; + std::vector& midN = quadNodesAtTetrahedra[ i ]; if ( midN.size() >= 10-4 ) // TETRA10 { - if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], + if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], midN[2], midN[1], midN[0], midN[3], midN[5], midN[4], tetIDShift + i )) status = storeBadNodeIds( "GmfTetrahedra + GmfExtraVerticesAtTetrahedra",i, 10, - iN[0], iN[2], iN[1], iN[3], + iN[0], iN[2], iN[1], iN[3], midN[2], midN[1], midN[0], midN[3], midN[5], midN[4] ); } else // TETRA4 @@ -321,7 +321,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform() &iN[6], &iN[7], &iN[8], &iN[9], &iN[10], &iN[11], &iN[12], &iN[13], // HEXA20 &iN[14], - &iN[15], &iN[16], &iN[17], &iN[18], + &iN[15], &iN[16], &iN[17], &iN[18], &iN[19], &iN[20]); // HEXA27 if ( iN[0] <= nbHex ) @@ -347,7 +347,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform() midN[7], midN[6], midN[5], midN[4], midN[8], midN[11], midN[10], midN[9], hexIDShift + i )) - status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20, + status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20, iN[0], iN[3], iN[2], iN[1], iN[4], iN[7], iN[6], iN[5], midN[3], midN[2], midN[1], midN[0], @@ -366,7 +366,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform() midN[17], midN[18], hexIDShift + i )) - status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27, + status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27, iN[0], iN[3], iN[2], iN[1], iN[4], iN[7], iN[6], iN[5], midN[3], midN[2], midN[1], midN[0], @@ -405,33 +405,33 @@ Driver_Mesh::Status DriverGMF_Read::Perform() // Read some entities into groups // see MeshGems/Docs/meshgems_formats_description.pdf - // get ids of existing groups - std::set< int > groupIDs; - const std::set& groups = myMesh->GetGroups(); - std::set::const_iterator grIter = groups.begin(); - for ( ; grIter != groups.end(); ++grIter ) - groupIDs.insert( (*grIter)->GetID() ); - if ( groupIDs.empty() ) groupIDs.insert( 0 ); + // get ids of existing groups + std::set< int > groupIDs; + const std::set& groups = myMesh->GetGroups(); + std::set::const_iterator grIter = groups.begin(); + for ( ; grIter != groups.end(); ++grIter ) + groupIDs.insert( (*grIter)->GetID() ); + if ( groupIDs.empty() ) groupIDs.insert( 0 ); // Read required entities into groups if ( _makeRequiredGroups ) { - const int kes[4][3] = { { GmfRequiredVertices, SMDSAbs_Node, nodeIDShift }, - { GmfRequiredEdges, SMDSAbs_Edge, edgeIDShift }, - { GmfRequiredTriangles, SMDSAbs_Face, triaIDShift }, - { GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift } - }; + const smIdType kes[4][3] = { { GmfRequiredVertices, SMDSAbs_Node, nodeIDShift }, + { GmfRequiredEdges, SMDSAbs_Edge, edgeIDShift }, + { GmfRequiredTriangles, SMDSAbs_Face, triaIDShift }, + { GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift } + }; const char* names[4] = { "_required_Vertices" , "_required_Edges" , "_required_Triangles" , - "_required_Quadrilaterals" - }; + "_required_Quadrilaterals" + }; for ( int i = 0; i < 4; ++i ) { - int gmfKwd = kes[i][0]; + int gmfKwd = FromIdType( kes[i][0] ); SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1]; - int shift = kes[i][2]; + smIdType shift = kes[i][2]; if ( int nb = GmfStatKwd(meshID, gmfKwd)) { const int newID = *groupIDs.rbegin() + 1; @@ -454,27 +454,27 @@ Driver_Mesh::Status DriverGMF_Read::Perform() if ( _makeFaultGroups ) { - const int kes[7][3] = { { GmfFault_SmallTri, SMDSAbs_Face, triaIDShift }, - { GmfFault_BadShape, SMDSAbs_Face, triaIDShift }, - { GmfFault_Overlap, SMDSAbs_Face, triaIDShift }, - { GmfFault_Inter, SMDSAbs_Face, triaIDShift }, - { GmfFault_NearTri, SMDSAbs_Face, triaIDShift }, - { GmfFault_FreeEdge, SMDSAbs_Face, triaIDShift }, - { GmfFault_MultipleEdge, SMDSAbs_Face, triaIDShift } - }; + const smIdType kes[7][3] = { { GmfFault_SmallTri, SMDSAbs_Face, triaIDShift }, + { GmfFault_BadShape, SMDSAbs_Face, triaIDShift }, + { GmfFault_Overlap, SMDSAbs_Face, triaIDShift }, + { GmfFault_Inter, SMDSAbs_Face, triaIDShift }, + { GmfFault_NearTri, SMDSAbs_Face, triaIDShift }, + { GmfFault_FreeEdge, SMDSAbs_Face, triaIDShift }, + { GmfFault_MultipleEdge, SMDSAbs_Face, triaIDShift } + }; const char* names[7] = { "Fault_SmallTri", "Fault_BadShape", "Fault_Overlap", - "Fault_Inter", + "Fault_Inter", "Fault_NearTri", "Fault_FreeEdge", "Fault_MultipleEdge" - }; + }; for ( int i = 0; i < 7; ++i ) { - int gmfKwd = kes[i][0]; + int gmfKwd = FromIdType( kes[i][0] ); SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1]; - int shift = kes[i][2]; + smIdType shift = kes[i][2]; if ( int nb = GmfStatKwd(meshID, gmfKwd)) { const int newID = *groupIDs.rbegin() + 1; diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h index 3bfc179dd..afde1cf05 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h @@ -35,7 +35,8 @@ typedef std::list TGroupList; class MESHDRIVERUNV_EXPORT DriverUNV_W_SMDS_Mesh: public Driver_SMDS_Mesh { public: - virtual Status Perform(); + + virtual Status Perform() override; void AddGroup(SMESHDS_GroupBase* theGroup) { myGroups.push_back(theGroup); } diff --git a/src/OBJECT/SMESH_NodeLabelActor.cxx b/src/OBJECT/SMESH_NodeLabelActor.cxx index 150d89b59..cafe8bc81 100644 --- a/src/OBJECT/SMESH_NodeLabelActor.cxx +++ b/src/OBJECT/SMESH_NodeLabelActor.cxx @@ -145,18 +145,18 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) { myPointsNumDataSet->ShallowCopy(aGrid); vtkUnstructuredGrid *aDataSet = myPointsNumDataSet; - - vtkIdType aNbElem = aDataSet->GetNumberOfPoints(); - - vtkIdTypeArray *anArray = vtkIdTypeArray::New(); + + vtkIdType aNbElem = aDataSet->GetNumberOfPoints(); + + vtkIdTypeArray *anArray = vtkIdTypeArray::New(); anArray->SetNumberOfValues( aNbElem ); - + for ( vtkIdType anId = 0; anId < aNbElem; anId++ ) { - vtkIdType aSMDSId = myVisualObj->GetNodeObjId( anId ); + vtkIdType aSMDSId = myVisualObj->GetNodeObjId( anId ); anArray->SetValue( anId, aSMDSId ); } - + aDataSet->GetPointData()->SetScalars( anArray ); myPtsMaskPoints->SetInputData( aDataSet ); myPointLabels->SetVisibility( GetVisibility() ); diff --git a/src/OBJECT/SMESH_SVTKActor.cxx b/src/OBJECT/SMESH_SVTKActor.cxx index 2d32fce94..759834aa3 100644 --- a/src/OBJECT/SMESH_SVTKActor.cxx +++ b/src/OBJECT/SMESH_SVTKActor.cxx @@ -135,7 +135,7 @@ SMESH_SVTKActor } outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2); for(vtkIdType ind = 1; ind <= aNbOfParts; ind++){ - vtkIdType aPartId = theMapIndex( ind ); + vtkIdType aPartId = theMapIndex( ind ); if(vtkCell* aCell = theMapActor->GetElemCell(aPartId)) { if (aCell->GetCellType() != VTK_POLYHEDRON) diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 6964928d1..f1355af04 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -2221,11 +2221,11 @@ void SMESHGUI_GroupDlg::onSort() // QMemArray anArray(k); // fill the array for (i = 0; i < k; i++) { - vtkIdType id; - if (sizeof(vtkIdType)==8) - id = myElements->item(i)->text().toLongLong(); - else - id = myElements->item(i)->text().toInt(); + vtkIdType id; + if (sizeof(vtkIdType)==8) + id = myElements->item(i)->text().toLongLong(); + else + id = myElements->item(i)->text().toInt(); anArray[i] = id; if (myElements->item(i)->isSelected()) aSelected.append(id); diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index ab72ab2fd..8ff55cbf5 100644 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -369,9 +369,9 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& /*theNewText*/) if ( findTriangles(aNode1,aNode2,tria1,tria2) ) { - newIndices.push_back( aNode1->GetID() ); - newIndices.push_back( aNode2->GetID() ); - + newIndices.push_back( aNode1->GetID() ); + newIndices.push_back( aNode2->GetID() ); + myOkBtn->setEnabled(true); myApplyBtn->setEnabled(true); } @@ -410,22 +410,22 @@ void SMESHGUI_SingleEditDlg::onSelectionDone() if(SMDS_Mesh* aMesh = aVisualObj->GetMesh()) { const SMDS_MeshElement* tria[2]; - - bool valid = false; + + bool valid = false; SVTK_IndexedMapOfVtkIds anIds; mySelector->GetCompositeIndex(anIO,anIds); if( anIds.Extent() == 1 && anIds(1).size() == 2 ) { - anId1 = anIds(1)[0]; - anId2 = anIds(1)[1]; - valid = true; + anId1 = anIds(1)[0]; + anId2 = anIds(1)[1]; + valid = true; } - + if( valid && findTriangles( aMesh->FindNode( anId1 ), aMesh->FindNode( anId2 ), tria[0],tria[1] ) ) { QString aText = QString("%1-%2").arg(anId1).arg(anId2); myEdge->setText(aText); - + myOkBtn->setEnabled(true); myApplyBtn->setEnabled(true); } diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 551f0b881..9390a027d 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -4237,7 +4237,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, if ( grImpl ) { CORBA::String_var objStr = GetORB()->object_to_string( grImpl->_this() ); - smIdType anId = myStudyContext->findId( string( objStr.in() ) ); + int anId = myStudyContext->findId( string( objStr.in() ) ); char grpName[ 30 ]; sprintf( grpName, "Group %d %d", anId, grImpl->GetLocalID() ); SMESHDS_GroupBase* aGrpBaseDS = grImpl->GetGroupDS(); @@ -4294,7 +4294,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, #endif CORBA::String_var objStr = GetORB()->object_to_string( anObject ); CORBA::String_var hypdata = myImpl->SaveTo(); - smIdType id = myStudyContext->findId( string( objStr.in() )); + int id = myStudyContext->findId( string( objStr.in() )); // for each hypothesis create HDF group basing on its id char hypGrpName[30]; @@ -4362,7 +4362,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, #endif CORBA::String_var objStr = GetORB()->object_to_string( anObject ); CORBA::String_var hypdata = myImpl->SaveTo(); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); // for each algorithm create HDF group basing on its id char hypGrpName[30]; @@ -4405,7 +4405,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, SMESH_Mesh_i* myImpl = dynamic_cast( GetServant( myMesh ).in() ); if ( myImpl ) { CORBA::String_var objStr = GetORB()->object_to_string( anObject ); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); ::SMESH_Mesh& myLocMesh = myImpl->GetImpl(); SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS(); bool hasShape = myLocMesh.HasShapeToMesh(); @@ -4524,7 +4524,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, //string myRefOnObject = myRefOnHyp->GetID(); CORBA::Object_var anObject = SObjectToObject( myRefOnHyp ); CORBA::String_var objStr = GetORB()->object_to_string( anObject ); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); //if ( myRefOnObject.length() > 0 ) { //aSize[ 0 ] = myRefOnObject.length() + 1; char hypName[ 30 ], hypId[ 30 ]; @@ -4568,7 +4568,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, //string myRefOnObject = myRefOnAlgo->GetID(); CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo ); CORBA::String_var objStr = GetORB()->object_to_string( anObject ); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); //if ( myRefOnObject.length() > 0 ) { //aSize[ 0 ] = myRefOnObject.length() + 1; char algoName[ 30 ], algoId[ 30 ]; @@ -4659,7 +4659,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, { SMESH::SMESH_subMesh_var mySubMesh = SMESH::SMESH_subMesh::_narrow( anSubObject ) ; CORBA::String_var objStr = GetORB()->object_to_string( anSubObject ); - smIdType subid = myStudyContext->findId( string( objStr.in() ) ); + int subid = myStudyContext->findId( string( objStr.in() ) ); // for each mesh open the HDF group basing on its id char submeshGrpName[ 30 ]; @@ -4698,7 +4698,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, //string myRefOnObject = myRefOnHyp->GetID(); CORBA::Object_var anObject = SObjectToObject( myRefOnHyp ); CORBA::String_var objStr = GetORB()->object_to_string( anObject ); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); //if ( myRefOnObject.length() > 0 ) { //aSize[ 0 ] = myRefOnObject.length() + 1; char hypName[ 30 ], hypId[ 30 ]; @@ -4735,7 +4735,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, //string myRefOnObject = myRefOnAlgo->GetID(); CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo ); CORBA::String_var objStr = GetORB()->object_to_string( anObject ); - smIdType id = myStudyContext->findId( string( objStr.in() ) ); + int id = myStudyContext->findId( string( objStr.in() ) ); //if ( myRefOnObject.length() > 0 ) { //aSize[ 0 ] = myRefOnObject.length() + 1; char algoName[ 30 ], algoId[ 30 ]; @@ -4864,7 +4864,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, continue; CORBA::String_var objStr = GetORB()->object_to_string( aSubObject ); - smIdType anId = myStudyContext->findId( string( objStr.in() ) ); + int anId = myStudyContext->findId( string( objStr.in() ) ); // For each group, create a dataset named "Group " // and store the group's user name into it @@ -5330,7 +5330,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, // myImpl->LoadFrom( hypdata.c_str() ); hypDataList.push_back( make_pair( myImpl, hypdata )); CORBA::String_var iorString = GetORB()->object_to_string( myHyp ); - smIdType newId = myStudyContext->findId( iorString.in() ); + int newId = myStudyContext->findId( iorString.in() ); myStudyContext->mapOldToNew( id, newId ); } else @@ -5434,7 +5434,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, //myImpl->LoadFrom( hypdata.c_str() ); hypDataList.push_back( make_pair( myImpl, hypdata )); CORBA::String_var iorString = GetORB()->object_to_string( myHyp ); - smIdType newId = myStudyContext->findId( iorString.in() ); + int newId = myStudyContext->findId( iorString.in() ); myStudyContext->mapOldToNew( id, newId ); } else @@ -5475,7 +5475,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, meshGroupList.push_back( make_pair( myNewMeshImpl, aTopGroup )); CORBA::String_var iorString = GetORB()->object_to_string( myNewMesh ); - smIdType newId = myStudyContext->findId( iorString.in() ); + int newId = myStudyContext->findId( iorString.in() ); myStudyContext->mapOldToNew( id, newId ); // ouv : NPAL12872 @@ -5578,7 +5578,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, // get mesh old id CORBA::String_var iorString = GetORB()->object_to_string( myNewMeshImpl->_this() ); - smIdType newId = myStudyContext->findId( iorString.in() ); + int newId = myStudyContext->findId( iorString.in() ); int meshOldId = myStudyContext->getOldId( newId ); // try to find mesh data dataset @@ -5730,7 +5730,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, if ( aSubMesh->_is_nil() ) continue; string iorSubString = GetORB()->object_to_string( aSubMesh ); - smIdType newSubId = myStudyContext->findId( iorSubString ); + int newSubId = myStudyContext->findId( iorSubString ); myStudyContext->mapOldToNew( subid, newSubId ); } } @@ -5923,7 +5923,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, continue; string iorSubString = GetORB()->object_to_string( aNewGroup ); - smIdType newSubId = myStudyContext->findId( iorSubString ); + int newSubId = myStudyContext->findId( iorSubString ); myStudyContext->mapOldToNew( subid, newSubId ); SMESH_GroupBase_i* aGroupImpl = SMESH::DownCast< SMESH_GroupBase_i*>( aNewGroup ); @@ -6192,7 +6192,7 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/, if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" ); if ( myStudyContext && strcmp( IORString, "" ) != 0 ) { - smIdType anId = myStudyContext->findId( IORString ); + int anId = myStudyContext->findId( IORString ); if ( anId ) { if(MYDEBUG) MESSAGE( "VSR " << anId ) char strId[ 20 ]; diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 1619e0f75..e36fa723c 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -622,7 +622,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedNodes() const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes(); myLastCreatedNodes->length( aSeq.size() ); - for ( smIdType i = 0; i < aSeq.size(); i++) + for ( size_t i = 0; i < aSeq.size(); i++) myLastCreatedNodes[i] = aSeq[i]->GetID(); return myLastCreatedNodes._retn(); @@ -644,7 +644,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedElems() const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems(); myLastCreatedElems->length( aSeq.size() ); - for ( smIdType i = 0; i < aSeq.size(); i++ ) + for ( size_t i = 0; i < aSeq.size(); i++ ) myLastCreatedElems[i] = aSeq[i]->GetID(); return myLastCreatedElems._retn(); @@ -1275,7 +1275,7 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje SMESH::smIdType_array_var newElems = new SMESH::smIdType_array; newElems->length( elems0D.size() ); TIDSortedElemSet::iterator eIt = elems0D.begin(); - for ( smIdType i = 0; i < elems0D.size(); ++i, ++eIt ) + for ( size_t i = 0; i < elems0D.size(); ++i, ++eIt ) newElems[ i ] = (*eIt)->GetID(); SMESH::SMESH_GroupBase_var groupToFill; @@ -4575,7 +4575,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double SMDSAbs_ElementType( type ), foundElems); res->length( foundElems.size() ); - for ( smIdType i = 0; i < foundElems.size(); ++i ) + for ( size_t i = 0; i < foundElems.size(); ++i ) res[i] = foundElems[i]->GetID(); return res._retn(); @@ -4646,7 +4646,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID SMDSAbs_ElementType( type ), foundElems); res->length( foundElems.size() ); - for ( smIdType i = 0; i < foundElems.size(); ++i ) + for ( size_t i = 0; i < foundElems.size(); ++i ) res[i] = foundElems[i]->GetID(); return res._retn(); diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx index 4408fe3c1..c95b549ff 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx @@ -2052,7 +2052,7 @@ public: for ( int i = 1; i <= idMap.Extent(); i++ ) { myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) ); - } + } } }; diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index adaac256d..6d8bafd3f 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -2483,7 +2483,7 @@ bool StdMeshers_Prism_3D::assocOrProjBottom2Top( const gp_Trsf & bottomToTopTrsf // Fill myBotToColumnMap - int zSize = myBlock.VerticalSize(); + size_t zSize = myBlock.VerticalSize(); TNodeNodeMap::const_iterator bN_tN = n2nMapPtr->begin(); for ( ; bN_tN != n2nMapPtr->end(); ++bN_tN ) { @@ -2555,7 +2555,7 @@ bool StdMeshers_Prism_3D::projectBottomToTop( const gp_Trsf & bottom // Fill myBotToColumnMap - int zSize = myBlock.VerticalSize(); + size_t zSize = myBlock.VerticalSize(); Prism_3D::TNode prevTNode; SMDS_NodeIteratorPtr nIt = botSMDS->GetNodes(); while ( nIt->more() ) @@ -3910,7 +3910,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper, return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ") << "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face )); } - if ( !faceColumns.empty() && (int)faceColumns.begin()->second.size() != VerticalSize() ) + if ( !faceColumns.empty() && faceColumns.begin()->second.size() != VerticalSize() ) return error(COMPERR_BAD_INPUT_MESH, "Different 'vertical' discretization"); // edge columns @@ -4226,7 +4226,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector & const Prism_3D::TPrismTopo& prism) const { const bool itTopMeshed = !SubMesh( ID_BOT_FACE )->IsEmpty(); - const int zSize = VerticalSize(); + const size_t zSize = VerticalSize(); if ( zSize < 3 && !itTopMeshed ) return true; trsf.resize( zSize - 1 ); @@ -4273,7 +4273,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector & gp_Ax3 cs0 = getLayerCoordSys(0, columns, xCol ); //double dist0 = cs0.Location().Distance( gpXYZ( (*columns[0])[0])); toCs0.SetTransformation( cs0 ); - for ( int z = 1; z < zSize; ++z ) + for ( size_t z = 1; z < zSize; ++z ) { gp_Ax3 csZ = getLayerCoordSys(z, columns, xCol ); //double distZ = csZ.Location().Distance( gpXYZ( (*columns[0])[z])); @@ -5614,7 +5614,7 @@ bool StdMeshers_Sweeper::ComputeNodesOnStraight() int botTriaNodes[3], topTriaNodes[3]; bool checkUV = true; - int nbInternalNodes = myIntColumns.size(); + size_t nbInternalNodes = myIntColumns.size(); myBotDelaunay->InitTraversal( nbInternalNodes ); while (( botNode = myBotDelaunay->NextNode( botBC, botTriaNodes ))) @@ -5763,7 +5763,7 @@ bool StdMeshers_Sweeper::findDelaunayTriangles() TopBotTriangles tbTrias; bool checkUV = true; - int nbInternalNodes = myIntColumns.size(); + size_t nbInternalNodes = myIntColumns.size(); myTopBotTriangles.resize( nbInternalNodes ); myBotDelaunay->InitTraversal( nbInternalNodes ); diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 41def7807..cc392f692 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -1531,7 +1531,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, if ( theConsiderMesh ) { - const size_t nbSegments = std::max( faceSide.NbPoints()-1, faceSide.NbSegments() ); + const smIdType nbSegments = std::max( faceSide.NbPoints()-1, faceSide.NbSegments() ); if ( nbSegments < nbCorners ) return error(COMPERR_BAD_INPUT_MESH, TComm("Too few boundary nodes: ") << nbSegments); } diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index fff61641c..157560446 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -1097,7 +1097,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, double parI = par0 + ( par1 - par0 ) * r; Params.InsertBefore( i, parI ); auto it = nbsegs.begin(); - auto incr_it = i - 2 + iDiap; + smIdType incr_it = i - 2 + iDiap; nbsegs.insert( it + incr_it, nbSegPerDiap ); } nbsegs[ i-2 + nbDiapason - 1 ] = nbSegPerDiap + nbTot % nbDiapason;