From: msv Date: Fri, 14 Jan 2005 13:32:49 +0000 (+0000) Subject: Improve SMDS: porting to WNT X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0e5b30f800343f6f7652bcfe9be8e5eff346438;p=modules%2Fsmesh.git Improve SMDS: porting to WNT --- diff --git a/src/SMDS/SMDS_IteratorOfElements.cxx b/src/SMDS/SMDS_IteratorOfElements.cxx index c18f24d25..472ae0d54 100644 --- a/src/SMDS/SMDS_IteratorOfElements.cxx +++ b/src/SMDS/SMDS_IteratorOfElements.cxx @@ -19,11 +19,15 @@ // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + #include "SMDS_IteratorOfElements.hxx" bool SMDS_IteratorOfElements::subMore() { - if((t2Iterator==NULL)||(!t2Iterator->more())) + if((t2Iterator.get()==NULL)||(!t2Iterator->more())) { if(t1Iterator->more()) { @@ -37,7 +41,7 @@ bool SMDS_IteratorOfElements::subMore() const SMDS_MeshElement * SMDS_IteratorOfElements::subNext() { - if((t2Iterator==NULL)||(!t2Iterator->more())) + if((t2Iterator.get()==NULL)||(!t2Iterator->more())) if(t1Iterator->more()) t2Iterator=t1Iterator->next()->elementsIterator(myType); return t2Iterator->next(); diff --git a/src/SMDS/SMDS_MeshEdge.cxx b/src/SMDS/SMDS_MeshEdge.cxx index 640723147..66c8ae3d5 100644 --- a/src/SMDS/SMDS_MeshEdge.cxx +++ b/src/SMDS/SMDS_MeshEdge.cxx @@ -25,6 +25,9 @@ // Author : Jean-Michel BOULCOURT // Module : SMESH +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif #include "SMDS_MeshEdge.hxx" #include "SMDS_IteratorOfElements.hxx" diff --git a/src/SMDS/SMDS_MeshElement.cxx b/src/SMDS/SMDS_MeshElement.cxx index bf4564f90..8d4d9b75d 100644 --- a/src/SMDS/SMDS_MeshElement.cxx +++ b/src/SMDS/SMDS_MeshElement.cxx @@ -19,6 +19,10 @@ // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + #include "SMDS_MeshElement.hxx" #include "SMDS_MeshNode.hxx" #include "SMDS_MeshEdge.hxx" diff --git a/src/SMDS/SMDS_MeshGroup.cxx b/src/SMDS/SMDS_MeshGroup.cxx index 6a255e152..0acb246a8 100644 --- a/src/SMDS/SMDS_MeshGroup.cxx +++ b/src/SMDS/SMDS_MeshGroup.cxx @@ -24,6 +24,10 @@ // Author : Jean-Michel BOULCOURT // Module : SMESH +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + #include "SMDS_MeshGroup.hxx" #include "utilities.h" diff --git a/src/SMDS/SMDS_MeshGroup.hxx b/src/SMDS/SMDS_MeshGroup.hxx index 69084c5b9..ef2264c12 100644 --- a/src/SMDS/SMDS_MeshGroup.hxx +++ b/src/SMDS/SMDS_MeshGroup.hxx @@ -65,7 +65,7 @@ class SMDS_MeshGroup:public SMDS_MeshObject SMDS_MeshGroup(SMDS_MeshGroup* theParent, const SMDSAbs_ElementType theType = SMDSAbs_All); - typedef std::set::iterator TIterator; + typedef std::set::const_iterator TIterator; const SMDS_Mesh * myMesh; SMDSAbs_ElementType myType; std::set myElements; diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 9ee35fd19..f79e97d7b 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -3,6 +3,9 @@ // Author : Edward AGAPOV (eap) // Copyright : Open CASCADE +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif #include "SMDS_VolumeTool.hxx" @@ -10,6 +13,7 @@ #include "SMDS_MeshNode.hxx" #include #include +#include using namespace std; @@ -389,7 +393,7 @@ bool SMDS_VolumeTool::GetFaceNodes (int faceIndex, theFaceNodes.clear(); int iNode, nbNode = myFaceNbNodes[ faceIndex ]; - for ( int iNode = 0; iNode < nbNode; iNode++ ) + for ( iNode = 0; iNode < nbNode; iNode++ ) theFaceNodes.insert( myFaceNodes[ iNode ]); return true; @@ -415,7 +419,7 @@ bool SMDS_VolumeTool::IsFaceExternal( int faceIndex ) return ( reversed ? faceIndex != 0 : faceIndex != 1 ); case 8: { // in a forward hexahedron, odd face normal is external, else vice versa - bool odd = faceIndex % 2; + bool odd = (faceIndex % 2 != 0); return ( reversed ? !odd : odd ); } default:;