From: Viktor UZLOV Date: Thu, 11 Feb 2021 08:11:25 +0000 (+0300) Subject: fix some error. Build complete X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6b9f5b0da62da115c43e5a11c5496dc25040db71;p=modules%2Fsmesh.git fix some error. Build complete --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 5823bbe87..8844ad904 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -34,6 +34,7 @@ #include "SMESHDS_Mesh.hxx" #include "SMESH_MeshAlgos.hxx" #include "SMESH_OctreeNode.hxx" +#include "SMESH_Comment.hxx" #include #include @@ -3295,39 +3296,39 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr ) smIdType aMinId = myMin[i]; smIdType aMaxId = myMax[i]; - TCollection_AsciiString aStr; + SMESH_Comment aStr; if ( aMinId != IntegerFirst() ) - aStr += FromIdType(aMinId); + aStr << aMinId; aStr += "-"; - if ( aMaxId != IntegerLast() ) - aStr += FromIdType(aMaxId); + if ( aMaxId != std::numeric_limits::max() ) + aStr << aMaxId; // find position of the string in result sequence and insert string in it if ( anIntSeq.Length() == 0 ) { anIntSeq.Append( aMinId ); - aStrSeq.Append( aStr ); + aStrSeq.Append( (const char*)aStr ); } else { if ( aMinId < anIntSeq.First() ) { anIntSeq.Prepend( aMinId ); - aStrSeq.Prepend( aStr ); + aStrSeq.Prepend( (const char*)aStr ); } else if ( aMinId > anIntSeq.Last() ) { anIntSeq.Append( aMinId ); - aStrSeq.Append( aStr ); + aStrSeq.Append( (const char*)aStr ); } else for ( int j = 1, k = anIntSeq.Length(); j <= k; j++ ) if ( aMinId < anIntSeq( j ) ) { anIntSeq.InsertBefore( j, aMinId ); - aStrSeq.InsertBefore( j, aStr ); + aStrSeq.InsertBefore( j, (const char*)aStr ); break; } } diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 1a37f5082..6f2ad3932 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -978,14 +978,14 @@ namespace { if (( myOri = ( n1->GetID() < n2->GetID() ))) { - first = FromIdType(n1->GetID()); - second = FromIdType(n2->GetID()); + first = n1->GetID(); + second = n2->GetID(); } else { myOri = -1; - first = FromIdType(n2->GetID()); - second = FromIdType(n1->GetID()); + first = n2->GetID(); + second = n1->GetID(); } myOri *= ori; } @@ -2210,7 +2210,7 @@ const SMDS_MeshVolume* SMDS_VolumeTool::Element() const //purpose : return element ID //======================================================================= -int SMDS_VolumeTool::ID() const +smIdType SMDS_VolumeTool::ID() const { - return myVolume ? FromIdType(myVolume->GetID()) : 0; + return myVolume ? myVolume->GetID() : 0; } diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index 2c7f619ae..b22a99bbf 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -31,6 +31,8 @@ #include "SMESH_SMDS.hxx" +#include + class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_MeshVolume; @@ -72,7 +74,7 @@ class SMDS_EXPORT SMDS_VolumeTool const SMDS_MeshVolume* Element() const; // return element - int ID() const; + smIdType ID() const; // return element ID bool IsPoly() const { return myPolyedre; } diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index f2245d40a..d594b9bfa 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.cxx +++ b/src/SMESHDS/SMESHDS_GroupBase.cxx @@ -154,7 +154,7 @@ bool SMESHDS_GroupBase::Contains (const smIdType theID) bool SMESHDS_GroupBase::Contains (const SMDS_MeshElement* elem) { if ( elem ) - return Contains( FromIdType(elem->GetID()) ); + return Contains( elem->GetID() ); return false; } diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index bdfff5b5b..69326ecbd 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -992,7 +992,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::displaySimulation() SMESH::TPolySimulation::TVTKIds aVTKIds_faces; while( anIter->more() ) if ( const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next() ){ - vtkIdType aId = myActor->GetObject()->GetNodeVTKId( FromIdType(aNode->GetID()) ); + vtkIdType aId = myActor->GetObject()->GetNodeVTKId( aNode->GetID() ); aVTKIds.push_back(aId); aVTKIds_faces.push_back(aId); }