From: adam Date: Thu, 11 Mar 2010 17:53:32 +0000 (+0000) Subject: Remove some warnings X-Git-Tag: V5_1_main_FINAL~150 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1e1e75bf55dbf9f29e47ebbdd3b5fec516791f7a;p=tools%2Fmedcoupling.git Remove some warnings --- diff --git a/src/INTERP_KERNEL/CellModel.cxx b/src/INTERP_KERNEL/CellModel.cxx index 4c367a115..61adf534d 100644 --- a/src/INTERP_KERNEL/CellModel.cxx +++ b/src/INTERP_KERNEL/CellModel.cxx @@ -333,7 +333,7 @@ namespace INTERP_KERNEL else {//polyedron const int *where=nodalConn; - for(int i=0;isecond; std::vector< std::vector< CConnType > > newStructIndices; - for ( int iInd = 0; iInd < structIndices.size(); ++iInd ) + for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) { for ( int i = min_i; i < max_i; ++i ) { @@ -183,7 +183,7 @@ namespace INTERP_KERNEL // perform intersection - for ( int iInd = 0; iInd < structIndices.size(); ++iInd ) + for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) intersector->intersectCells( iT, structIndices[iInd], result ); } delete intersector; diff --git a/src/INTERP_KERNEL/InterpolationOptions.cxx b/src/INTERP_KERNEL/InterpolationOptions.cxx index a0374a9f3..f8c568a07 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.cxx +++ b/src/INTERP_KERNEL/InterpolationOptions.cxx @@ -102,7 +102,7 @@ bool INTERP_KERNEL::InterpolationOptions::setOptionInt(const std::string& key, i } else if(key==DO_ROTATE_STR) { - setDoRotate(value); + setDoRotate(value != 0); return true; } else if(key==ORIENTATION_STR) diff --git a/src/INTERP_KERNEL/IntersectorCU3D.txx b/src/INTERP_KERNEL/IntersectorCU3D.txx index cef867769..2f0654067 100644 --- a/src/INTERP_KERNEL/IntersectorCU3D.txx +++ b/src/INTERP_KERNEL/IntersectorCU3D.txx @@ -145,7 +145,7 @@ namespace INTERP_KERNEL // intersect a cartesian 3d cell with tetra _uHexMesh->setHexa( _FMIC(icellS[0]),_FMIC(icellS[1]),_FMIC(icellS[2])); // set cell at i,j,k double res = 0; - for ( int t = 0; t < tetra.size(); ++t ) + for ( unsigned int t = 0; t < tetra.size(); ++t ) { res += tetra[t]->intersectSourceCell( 0 ); delete tetra[t]; diff --git a/src/INTERP_KERNEL/PointLocatorAlgos.txx b/src/INTERP_KERNEL/PointLocatorAlgos.txx index 9fe6b6daa..9386fcb26 100644 --- a/src/INTERP_KERNEL/PointLocatorAlgos.txx +++ b/src/INTERP_KERNEL/PointLocatorAlgos.txx @@ -91,7 +91,7 @@ namespace INTERP_KERNEL std::vector candidates; _tree->getElementsAroundPoint(x,candidates); std::list retlist; - for(int i=0; i< candidates.size(); i++) + for(unsigned int i=0; i< candidates.size(); i++) { int ielem=candidates[i]; if (elementContainsPoint(ielem,x,eps)) diff --git a/src/INTERP_KERNEL/SplitterTetra.txx b/src/INTERP_KERNEL/SplitterTetra.txx index 1862a242a..b5e39f31c 100644 --- a/src/INTERP_KERNEL/SplitterTetra.txx +++ b/src/INTERP_KERNEL/SplitterTetra.txx @@ -460,7 +460,7 @@ namespace INTERP_KERNEL { // free potential sub-mesh nodes that have been allocated typename MyMeshTypeT::MyConnType nbOfNodesT = _node_ids.size();// Issue 0020634. - if(_nodes.size()>=/*8*/nbOfNodesT) + if((int)_nodes.size()>=/*8*/nbOfNodesT) { std::vector::iterator iter = _nodes.begin() + /*8*/nbOfNodesT; while(iter != _nodes.end()) diff --git a/src/INTERP_KERNEL/TransformedTriangle.hxx b/src/INTERP_KERNEL/TransformedTriangle.hxx index 53122c623..a8328ed42 100644 --- a/src/INTERP_KERNEL/TransformedTriangle.hxx +++ b/src/INTERP_KERNEL/TransformedTriangle.hxx @@ -92,7 +92,7 @@ namespace INTERP_KERNEL * If OPTIMIZE is defined, a large number of methods will be prefixed with inline and some optimizations concerning the tests * with zero double products will be used. */ - class INTERPKERNEL_EXPORT TransformedTriangle + class TransformedTriangle { @@ -128,20 +128,20 @@ namespace INTERP_KERNEL /// NB : order corresponds to TetraEdges (Grandy, table III) enum DoubleProduct { C_YZ = 0, C_ZX, C_XY, C_ZH, C_XH, C_YH, C_01, C_10, NO_DP }; - TransformedTriangle(double* p, double* q, double* r); - ~TransformedTriangle(); + INTERPKERNEL_EXPORT TransformedTriangle(double* p, double* q, double* r); + INTERPKERNEL_EXPORT ~TransformedTriangle(); - double calculateIntersectionVolume(); + INTERPKERNEL_EXPORT double calculateIntersectionVolume(); - void dumpCoords() const; + INTERPKERNEL_EXPORT void dumpCoords() const; // Queries of member values used by UnitTetraIntersectionBary - const double* getCorner(TriCorner corner) const { return _coords + 5*corner; } + INTERPKERNEL_EXPORT const double* getCorner(TriCorner corner) const { return _coords + 5*corner; } - const std::vector& getPolygonA() const { return _polygonA; } + INTERPKERNEL_EXPORT const std::vector& getPolygonA() const { return _polygonA; } - double getVolume() const { return _volume; } + INTERPKERNEL_EXPORT double getVolume() const { return _volume; } protected: diff --git a/src/INTERP_KERNEL/UnitTetraIntersectionBary.cxx b/src/INTERP_KERNEL/UnitTetraIntersectionBary.cxx index d25117006..74b6a7908 100644 --- a/src/INTERP_KERNEL/UnitTetraIntersectionBary.cxx +++ b/src/INTERP_KERNEL/UnitTetraIntersectionBary.cxx @@ -325,11 +325,11 @@ namespace INTERP_KERNEL for ( int j = 0; j < 3 && !sideAdded[j]; ++j ) { if ( epsilonEqual( coordSum[j], 0.0 )) - sideAdded[j] = bool( ++nbAddedSides ); + sideAdded[j] = ++nbAddedSides != 0 ; } if ( !sideAdded[3] && ( epsilonEqual( (coordSum[0]+coordSum[1]+coordSum[2]) / polygon.size(), 1. ))) - sideAdded[3] = bool( ++nbAddedSides ); + sideAdded[3] = ++nbAddedSides != 0 ; } if ( nbAddedSides == NB_TETRA_SIDES ) return nbAddedSides; @@ -559,7 +559,7 @@ namespace INTERP_KERNEL // at least 3 segments - all corners of a side are cut off for (int cutIndex = 0; cutIndex < NB_TETRA_NODES; ++cutIndex ) if ( cutIndex != i+1 && !passedCorners[ cutIndex ] && !cutOffCorners[ cutIndex ]) - cutOffCorners[ cutIndex ] = bool ( ++nbCutOffCorners ); + cutOffCorners[ cutIndex ] = ++nbCutOffCorners != 0 ; } } @@ -570,7 +570,7 @@ namespace INTERP_KERNEL { for (int cutIndex = 1; cutIndex < NB_TETRA_NODES; ++cutIndex ) if ( !passedCorners[ cutIndex ] && !cutOffCorners[ cutIndex ]) - cutOffCorners[ cutIndex ] = bool ( ++nbCutOffCorners ); + cutOffCorners[ cutIndex ] = ++nbCutOffCorners != 0 ; } // Add to faces on tetra sides the corners not cut off by segments of intersection polygons diff --git a/src/INTERP_KERNEL/UnitTetraIntersectionBary.hxx b/src/INTERP_KERNEL/UnitTetraIntersectionBary.hxx index f03cab4a5..20f297caa 100644 --- a/src/INTERP_KERNEL/UnitTetraIntersectionBary.hxx +++ b/src/INTERP_KERNEL/UnitTetraIntersectionBary.hxx @@ -30,31 +30,31 @@ namespace INTERP_KERNEL { - class INTERPKERNEL_EXPORT UnitTetraIntersectionBary : protected TransformedTriangle + class UnitTetraIntersectionBary : protected TransformedTriangle { public: - UnitTetraIntersectionBary(bool isTetraInversed=false); + INTERPKERNEL_EXPORT UnitTetraIntersectionBary(bool isTetraInversed=false); - void init(bool isTetraInversed=false); + INTERPKERNEL_EXPORT void init(bool isTetraInversed=false); /*! * \brief Stores a part of triangle common with the unit tetrahedron * \param triangle - triangle side of other cell, whose calculateIntersectionVolume() * must have already been called */ - void addSide(const TransformedTriangle& triangle); + INTERPKERNEL_EXPORT void addSide(const TransformedTriangle& triangle); /*! * \brief Computes and return coordinates of barycentre */ - bool getBary(double* baryCenter); + INTERPKERNEL_EXPORT bool getBary(double* baryCenter); /*! * \brief Returns volume of intersection * \retval double - */ - inline double getVolume() const { return _int_volume; } + INTERPKERNEL_EXPORT inline double getVolume() const { return _int_volume; } - virtual ~UnitTetraIntersectionBary(); + INTERPKERNEL_EXPORT virtual ~UnitTetraIntersectionBary(); private: