From 017ea5b3eaa3e49fd28ce36a6e8b22d867e27510 Mon Sep 17 00:00:00 2001 From: Viktor UZLOV Date: Thu, 11 Feb 2021 19:35:07 +0300 Subject: [PATCH] fix warnings. Build completed --- src/Controls/SMESH_Controls.cxx | 16 ++++---- src/Controls/SMESH_ControlsDef.hxx | 7 ++-- src/DriverCGNS/DriverCGNS_Read.cxx | 8 ++-- src/DriverCGNS/DriverCGNS_Write.cxx | 14 +++---- src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx | 10 ++--- src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx | 2 +- src/MEDWrapper/MED_Common.hxx | 2 + src/SMDS/SMDS_VolumeTool.cxx | 2 +- src/SMESH/SMESH_Algo.cxx | 2 +- src/SMESH/SMESH_Mesh.cxx | 46 +++++++++++----------- src/SMESH/SMESH_Mesh.hxx | 42 ++++++++++---------- src/SMESH/SMESH_MeshEditor.cxx | 4 +- src/SMESH/SMESH_Pattern.cxx | 6 +-- src/SMESH/SMESH_ProxyMesh.cxx | 4 +- src/SMESH/SMESH_ProxyMesh.hxx | 2 +- src/SMESH/SMESH_subMesh.cxx | 4 +- 16 files changed, 87 insertions(+), 84 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 8844ad904..b888ff0df 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -2868,8 +2868,8 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh ) SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType(); if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) { // add elements IDS into control - int aSize = aGrp->Extent(); - for (int i = 0; i < aSize; i++) + smIdType aSize = aGrp->Extent(); + for (smIdType i = 0; i < aSize; i++) myIDs.insert( aGrp->GetID(i+1) ); } } @@ -3020,7 +3020,7 @@ ConnectedElements::ConnectedElements(): SMDSAbs_ElementType ConnectedElements::GetType() const { return myType; } -int ConnectedElements::GetNode() const +smIdType ConnectedElements::GetNode() const { return myXYZ.empty() ? myNodeID : 0; } // myNodeID can be found by myXYZ std::vector ConnectedElements::GetPoint() const @@ -3047,7 +3047,7 @@ void ConnectedElements::SetMesh( const SMDS_Mesh* theMesh ) } } -void ConnectedElements::SetNode( int nodeID ) +void ConnectedElements::SetNode( smIdType nodeID ) { myNodeID = nodeID; myXYZ.clear(); @@ -3279,14 +3279,14 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr ) { theResStr.Clear(); - TColStd_SequenceOfInteger anIntSeq; + TIDsSeq anIntSeq; TColStd_SequenceOfAsciiString aStrSeq; TIDsMap::Iterator anIter( myIds ); for ( ; anIter.More(); anIter.Next() ) { - int anId = anIter.Key(); - TCollection_AsciiString aStr( anId ); + smIdType anId = anIter.Key(); + TCollection_AsciiString aStr( FromIdType(anId) ); anIntSeq.Append( anId ); aStrSeq.Append( aStr ); } @@ -3300,7 +3300,7 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr ) if ( aMinId != IntegerFirst() ) aStr << aMinId; - aStr += "-"; + aStr << "-"; if ( aMaxId != std::numeric_limits::max() ) aStr << aMaxId; diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 596d0450e..1f6411b50 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -59,6 +59,7 @@ class gp_Pln; class gp_Pnt; typedef NCollection_Map< smIdType, smIdHasher > TIDsMap; +typedef NCollection_Sequence TIDsSeq; namespace SMESH{ namespace Controls{ @@ -1164,16 +1165,16 @@ namespace SMESH{ public: ConnectedElements(); //virtual Predicate* clone() const { return new ConnectedElements( *this ); } - void SetNode( int nodeID ); + void SetNode( smIdType nodeID ); void SetPoint( double x, double y, double z ); - int GetNode() const; + smIdType GetNode() const; std::vector GetPoint() const; void SetType( SMDSAbs_ElementType theType ); virtual SMDSAbs_ElementType GetType() const; virtual void SetMesh( const SMDS_Mesh* theMesh ); - virtual bool IsSatisfy( long theElementId ); + virtual bool IsSatisfy( smIdType theElementId ); //const std::set& GetDomainIDs() const { return myOkIDs; } diff --git a/src/DriverCGNS/DriverCGNS_Read.cxx b/src/DriverCGNS/DriverCGNS_Read.cxx index 4ac3e92c6..cfb37c3e4 100644 --- a/src/DriverCGNS/DriverCGNS_Read.cxx +++ b/src/DriverCGNS/DriverCGNS_Read.cxx @@ -61,9 +61,9 @@ namespace struct TZoneData { int _id; - int _nodeIdShift; // nb nodes in previously read zones - int _elemIdShift; // nb faces in previously read zones - int _nbNodes, _nbElems; + smIdType _nodeIdShift; // nb nodes in previously read zones + smIdType _elemIdShift; // nb faces in previously read zones + smIdType _nbNodes, _nbElems; int _meshDim; int _sizeX, _sizeY, _sizeZ, _nbCells; // structured cgsize_t _sizes[NB_ZONE_SIZE_VAL]; @@ -1133,7 +1133,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform() case 2: addElemFun = & add_QUAD_4; break; case 3: addElemFun = & add_HEXA_8; break; } - int elemID = meshInfo.NbElements(); + smIdType elemID = meshInfo.NbElements(); const SMDS_MeshElement* elem = 0; for ( size_t i = 0; i < ids.size(); i += nbElemNodes ) { diff --git a/src/DriverCGNS/DriverCGNS_Write.cxx b/src/DriverCGNS/DriverCGNS_Write.cxx index 6cbeae2fe..bd6bcff2f 100644 --- a/src/DriverCGNS/DriverCGNS_Write.cxx +++ b/src/DriverCGNS/DriverCGNS_Write.cxx @@ -201,17 +201,17 @@ namespace */ struct TPolyhedFace { - int _id; // id of NGON_n - vector< int > _nodes; // lowest node IDs used for sorting + smIdType _id; // id of NGON_n + vector< smIdType > _nodes; // lowest node IDs used for sorting - TPolyhedFace( const SMDS_MeshNode** nodes, const int nbNodes, int ID):_id(ID) + TPolyhedFace( const SMDS_MeshNode** nodes, const smIdType nbNodes, smIdType ID):_id(ID) { - set< int > ids; - for ( int i = 0; i < nbNodes; ++i ) + set< smIdType > ids; + for ( smIdType i = 0; i < nbNodes; ++i ) ids.insert( nodes[i]->GetID() ); _nodes.resize( 3 ); // std::min( nbNodes, 4 )); hope 3 nodes is enough - set< int >::iterator idIt = ids.begin(); + set< smIdType >::iterator idIt = ids.begin(); for ( size_t j = 0; j < _nodes.size(); ++j, ++idIt ) _nodes[j] = *idIt; } @@ -276,7 +276,7 @@ Driver_Mesh::Status DriverCGNS_Write::Perform() // create a Zone // -------------- - int nbCells = myMesh->NbEdges(); + smIdType nbCells = myMesh->NbEdges(); if ( meshDim == 3 ) nbCells = myMesh->NbVolumes(); else if ( meshDim == 2 ) diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx index 3440ee09a..05d4900ef 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx @@ -37,7 +37,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() Kernel_Utils::Localizer loc; Status aResult = DRS_OK; - int nbNodes, nbCells; + smIdType nbNodes, nbCells; #if defined(WIN32) && defined(UNICODE) std::wstring file2Read = Kernel_Utils::utf8_decode_s(myFile); FILE* aFileId = _wfopen(file2Read.c_str(), L"w+"); @@ -60,7 +60,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() nbNodes = myMesh->NbNodes(); /* Combien de mailles, faces ou aretes ? */ - int nb_of_edges, nb_of_faces, nb_of_volumes; + smIdType nb_of_edges, nb_of_faces, nb_of_volumes; nb_of_edges = myMesh->NbEdges(); nb_of_faces = myMesh->NbFaces(); nb_of_volumes = myMesh->NbVolumes(); @@ -104,7 +104,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() for ( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) { - int nodeID = it->next()->GetID(); + smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; fprintf(aFileId, "%d ", nodeID ); @@ -120,7 +120,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) { - int nodeID = it->next()->GetID(); + smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; fprintf(aFileId, "%d ", nodeID ); @@ -155,7 +155,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) { - int nodeID = it->next()->GetID(); + smIdType nodeID = it->next()->GetID(); if ( !nodeNumByID.empty() ) nodeID = nodeNumByID[ nodeID ]; fprintf(aFileId, "%d ", nodeID ); diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index 355207436..375572dd5 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -246,7 +246,7 @@ namespace const SMDS_MeshNode* GetNode(){ return myCurrentNode; } - MED::TIntVector::value_type GetID(){ + MED::TIDVector::value_type GetID(){ return myCurrentNode->GetID(); } MED::TFloatVector::value_type GetCoord(TInt theCoodId){ diff --git a/src/MEDWrapper/MED_Common.hxx b/src/MEDWrapper/MED_Common.hxx index d9d8253d3..f6f6f2b0c 100644 --- a/src/MEDWrapper/MED_Common.hxx +++ b/src/MEDWrapper/MED_Common.hxx @@ -32,6 +32,7 @@ #include #include +#include #ifdef WIN32 #pragma warning(disable:4099) @@ -77,6 +78,7 @@ namespace MED typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable; typedef TVector TIntVector; + typedef TVector TIDVector; typedef TVector TFloatVector; typedef TVector TStringVector; typedef std::set TStringSet; diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 6f2ad3932..a97d7d143 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -969,7 +969,7 @@ bool SMDS_VolumeTool::GetFaceNodes (int faceIndex, namespace { - struct NLink : public std::pair + struct NLink : public std::pair { int myOri; NLink(const SMDS_MeshNode* n1=0, const SMDS_MeshNode* n2=0, int ori=1 ) diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index 44555e3d9..c3129299c 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -1043,7 +1043,7 @@ int SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W) int nbPoints = 0; for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); - int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes(); + smIdType nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes(); if(_quadraticMesh) nb = nb/2; nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 9ed363a17..2ab047f0d 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1183,7 +1183,7 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h if ( !GetMeshDS()->IsUsedHypothesis( hyp )) return; - int nbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); + smIdType nbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); if ( hyp && _callUp && !_callUp->IsLoaded() ) // for not loaded mesh (#16648) { _callUp->HypothesisModified( hyp->GetID(), /*updateIcons=*/true ); @@ -1257,7 +1257,7 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h HasModificationsToDiscard(); // to reset _isModified flag if mesh becomes empty GetMeshDS()->Modified(); - int newNbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); + smIdType newNbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); if ( hyp && _callUp ) _callUp->HypothesisModified( hyp->GetID(), newNbEntities != nbEntities ); } @@ -1746,7 +1746,7 @@ double SMESH_Mesh::GetComputeProgress() const */ //================================================================================ -int SMESH_Mesh::NbNodes() const +smIdType SMESH_Mesh::NbNodes() const { Unexpect aCatch(SalomeException); return _myMeshDS->NbNodes(); @@ -1758,7 +1758,7 @@ int SMESH_Mesh::NbNodes() const */ //================================================================================ -int SMESH_Mesh::Nb0DElements() const +smIdType SMESH_Mesh::Nb0DElements() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().Nb0DElements(); @@ -1770,7 +1770,7 @@ int SMESH_Mesh::Nb0DElements() const */ //================================================================================ -int SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbEdges(order); @@ -1782,7 +1782,7 @@ int SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbFaces(order); @@ -1794,7 +1794,7 @@ int SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbTriangles(order); @@ -1806,7 +1806,7 @@ int SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbBiQuadTriangles() const +smIdType SMESH_Mesh::NbBiQuadTriangles() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbBiQuadTriangles(); @@ -1818,7 +1818,7 @@ int SMESH_Mesh::NbBiQuadTriangles() const */ //================================================================================ -int SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbQuadrangles(order); @@ -1830,7 +1830,7 @@ int SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbBiQuadQuadrangles() const +smIdType SMESH_Mesh::NbBiQuadQuadrangles() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbBiQuadQuadrangles(); @@ -1842,7 +1842,7 @@ int SMESH_Mesh::NbBiQuadQuadrangles() const */ //================================================================================ -int SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbPolygons(order); @@ -1854,7 +1854,7 @@ int SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbVolumes(order); @@ -1866,7 +1866,7 @@ int SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbTetras(order); @@ -1878,7 +1878,7 @@ int SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbHexas(order); @@ -1890,7 +1890,7 @@ int SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbTriQuadraticHexas() const +smIdType SMESH_Mesh::NbTriQuadraticHexas() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbTriQuadHexas(); @@ -1902,7 +1902,7 @@ int SMESH_Mesh::NbTriQuadraticHexas() const */ //================================================================================ -int SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbPyramids(order); @@ -1914,19 +1914,19 @@ int SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const */ //================================================================================ -int SMESH_Mesh::NbPrisms(SMDSAbs_ElementOrder order) const +smIdType SMESH_Mesh::NbPrisms(SMDSAbs_ElementOrder order) const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbPrisms(order); } -int SMESH_Mesh::NbQuadPrisms() const +smIdType SMESH_Mesh::NbQuadPrisms() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbQuadPrisms(); } -int SMESH_Mesh::NbBiQuadPrisms() const +smIdType SMESH_Mesh::NbBiQuadPrisms() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbBiQuadPrisms(); @@ -1939,7 +1939,7 @@ int SMESH_Mesh::NbBiQuadPrisms() const */ //================================================================================ -int SMESH_Mesh::NbHexagonalPrisms() const +smIdType SMESH_Mesh::NbHexagonalPrisms() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbHexPrisms(); @@ -1951,7 +1951,7 @@ int SMESH_Mesh::NbHexagonalPrisms() const */ //================================================================================ -int SMESH_Mesh::NbPolyhedrons() const +smIdType SMESH_Mesh::NbPolyhedrons() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbPolyhedrons(); @@ -1963,7 +1963,7 @@ int SMESH_Mesh::NbPolyhedrons() const */ //================================================================================ -int SMESH_Mesh::NbBalls() const +smIdType SMESH_Mesh::NbBalls() const { Unexpect aCatch(SalomeException); return _myMeshDS->GetMeshInfo().NbBalls(); @@ -1975,7 +1975,7 @@ int SMESH_Mesh::NbBalls() const */ //================================================================================ -int SMESH_Mesh::NbSubMesh() const +smIdType SMESH_Mesh::NbSubMesh() const { Unexpect aCatch(SalomeException); return _myMeshDS->NbSubMesh(); diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 4f9a3179d..7c34bfee0 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -282,31 +282,31 @@ class SMESH_EXPORT SMESH_Mesh double GetComputeProgress() const; - int NbNodes() const; - int Nb0DElements() const; - int NbBalls() const; + smIdType NbNodes() const; + smIdType Nb0DElements() const; + smIdType NbBalls() const; - int NbEdges(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbEdges(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbFaces(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbTriangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbQuadrangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbBiQuadQuadrangles() const; - int NbBiQuadTriangles() const; - int NbPolygons(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbFaces(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbTriangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbQuadrangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbBiQuadQuadrangles() const; + smIdType NbBiQuadTriangles() const; + smIdType NbPolygons(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbVolumes(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbTetras(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbHexas(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbTriQuadraticHexas() const; - int NbPyramids(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbPrisms(SMDSAbs_ElementOrder order = ORDER_ANY) const; - int NbQuadPrisms() const; - int NbBiQuadPrisms() const; - int NbHexagonalPrisms() const; - int NbPolyhedrons() const; + smIdType NbVolumes(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbTetras(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbHexas(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbTriQuadraticHexas() const; + smIdType NbPyramids(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbPrisms(SMDSAbs_ElementOrder order = ORDER_ANY) const; + smIdType NbQuadPrisms() const; + smIdType NbBiQuadPrisms() const; + smIdType NbHexagonalPrisms() const; + smIdType NbPolyhedrons() const; - int NbSubMesh() const; + smIdType NbSubMesh() const; int NbGroup() const { return _mapGroup.size(); } diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 50bca792e..3cb125ff2 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -188,7 +188,7 @@ SMESH_MeshEditor::AddElement(const vector & node, SMDS_MeshElement* e = 0; int nbnode = node.size(); SMESHDS_Mesh* mesh = GetMeshDS(); - const int ID = features.myID; + const smIdType ID = features.myID; switch ( features.myType ) { case SMDSAbs_Face: @@ -8751,7 +8751,7 @@ smIdType SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm, } // get elem data needed to re-create it // - const int id = elem->GetID(); + const smIdType id = elem->GetID(); const int nbNodes = elem->NbCornerNodes(); nodes.assign(elem->begin_nodes(), elem->end_nodes()); if ( aGeomType == SMDSEntity_Polyhedra ) diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index 413b07edc..fb1ab2c17 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -574,8 +574,8 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, SMESH_MesherHelper helper( *theMesh ); helper.SetSubShape( theFace ); - int nbNodes = ( !fSubMesh ? 0 : fSubMesh->NbNodes() ); - int nbElems = ( !fSubMesh ? 0 : fSubMesh->NbElements() ); + smIdType nbNodes = ( !fSubMesh ? 0 : fSubMesh->NbNodes() ); + smIdType nbElems = ( !fSubMesh ? 0 : fSubMesh->NbElements() ); if ( nbElems == 0 && aMeshDS->NbFaces() == 0 ) { MESSAGE( "No elements bound to the face"); @@ -3231,7 +3231,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, return setErrorCode( ERR_LOADV_BAD_SHAPE ); // count nodes - int nbNodes = 0, shapeID; + smIdType nbNodes = 0, shapeID; for ( shapeID = 1; shapeID <= myShapeIDMap.Extent(); shapeID++ ) { const TopoDS_Shape& S = myShapeIDMap( shapeID ); diff --git a/src/SMESH/SMESH_ProxyMesh.cxx b/src/SMESH/SMESH_ProxyMesh.cxx index 9bf11c371..670e225dc 100644 --- a/src/SMESH/SMESH_ProxyMesh.cxx +++ b/src/SMESH/SMESH_ProxyMesh.cxx @@ -402,9 +402,9 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces() const */ //================================================================================ -int SMESH_ProxyMesh::NbFaces() const +smIdType SMESH_ProxyMesh::NbFaces() const { - int nb = 0; + smIdType nb = 0; if ( _mesh->HasShapeToMesh() ) { TopTools_IndexedMapOfShape FF; diff --git a/src/SMESH/SMESH_ProxyMesh.hxx b/src/SMESH/SMESH_ProxyMesh.hxx index aa7440f57..1f88b85de 100644 --- a/src/SMESH/SMESH_ProxyMesh.hxx +++ b/src/SMESH/SMESH_ProxyMesh.hxx @@ -128,7 +128,7 @@ public: SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const; // Return total nb of faces taking into account substitutions - int NbFaces() const; + smIdType NbFaces() const; bool IsTemporary(const SMDS_MeshElement* elem ) const; diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 03ad4d5fc..d9493b3c1 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1331,12 +1331,12 @@ static void cleanSubMesh( SMESH_subMesh * subMesh ) if (SMESHDS_SubMesh * subMeshDS = subMesh->GetSubMeshDS()) { SMESHDS_Mesh * meshDS = subMesh->GetFather()->GetMeshDS(); - int nbElems = subMeshDS->NbElements(); + smIdType nbElems = subMeshDS->NbElements(); if ( nbElems > 0 ) for ( SMDS_ElemIteratorPtr ite = subMeshDS->GetElements(); ite->more(); ) meshDS->RemoveFreeElement( ite->next(), subMeshDS ); - int nbNodes = subMeshDS->NbNodes(); + smIdType nbNodes = subMeshDS->NbNodes(); if ( nbNodes > 0 ) for ( SMDS_NodeIteratorPtr itn = subMeshDS->GetNodes(); itn->more() ; ) { -- 2.39.2