From a839f14a189ce036f5bebad3df688122767f3e12 Mon Sep 17 00:00:00 2001 From: geay Date: Tue, 25 Feb 2014 11:03:21 +0100 Subject: [PATCH] Warning hunting. Thanks of them a bug has been found ! --- src/INTERP_KERNEL/InterpolationUtils.hxx | 6 +++--- src/MEDCoupling/MEDCouplingUMesh.cxx | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index 777387149..2a6808c1d 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -734,7 +734,7 @@ namespace INTERP_KERNEL inline std::vector reconstruct_polygon(const std::vector& V) { - std::size_t taille=V.size(); + int taille((int)V.size()); //VB : why 6 ? @@ -749,7 +749,7 @@ namespace INTERP_KERNEL COS[0]=1.0; SIN[0]=0.0; //angle[0]=0.0; - for(std::size_t i=0; i Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]); COS[i+1]=Trigo[0]; @@ -765,7 +765,7 @@ namespace INTERP_KERNEL Pt_ordonne.reserve(taille); // std::multimap Ordre; std::multimap,int, AngleLess> CosSin; - for(std::size_t i=0;igetPointer(); - int connIndexLgth=_nodal_connec_index->getNbOfElems(); - const int *connOld=_nodal_connec->getConstPointer(); - int connOldLgth=_nodal_connec->getNbOfElems(); + int *connIndex(_nodal_connec_index->getPointer()); + const int *connOld(_nodal_connec->getConstPointer()); MEDCouplingAutoRefCountObjectPtr connNew(DataArrayInt::New()),connNewI(DataArrayInt::New()); connNew->alloc(0,1); connNewI->alloc(1,1); connNewI->setIJ(0,0,0); std::vector toBeDone(nbOfCells,false); for(const int *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++) @@ -6362,8 +6360,8 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTreeFast() const DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arcDetEps) const { checkFullyDefined(); - int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes()); - if(spaceDim!=2 || spaceDim!=2) + int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()); + if(spaceDim!=2 || mDim!=2) throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic : This method should be applied on mesh with mesh dimension equal to 2 and space dimension also equal to 2!"); MEDCouplingAutoRefCountObjectPtr ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim); double *bbox(ret->getPointer()); @@ -6407,8 +6405,8 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arc DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(double arcDetEps) const { checkFullyDefined(); - int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes()); - if(spaceDim!=2 || spaceDim!=2) + int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()); + if(spaceDim!=2 || mDim!=1) throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic : This method should be applied on mesh with mesh dimension equal to 1 and space dimension also equal to 2!"); MEDCouplingAutoRefCountObjectPtr ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim); double *bbox(ret->getPointer()); -- 2.39.2